Skip to content

Commit

Permalink
[FIX] website_lazy_load_image: failing test
Browse files Browse the repository at this point in the history
This test had the branch red.

Fixing as asked in OCA#842 (comment).

@Tecnativa TT31295
  • Loading branch information
Jairo Llopis committed Oct 20, 2021
1 parent 3ac8215 commit 7bc44ab
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion website_lazy_load_image/tests/test_lazy_load_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,16 @@ def test_doctype_full_website_page(self):
website = self.env['website'].browse(self.website_id)
with MockRequest(self.env, website=website, multilang=False) as req:
req.csrf_token = lambda x: str(x)
req.endpoint_arguments = req.httprequest.args = {}
req.httprequest.query_string = b""
req.httprequest.path = "/web/login"
req.httprequest.url_root = "http://localhost"
res = self.env.ref("website.login_layout").render({
"request": req,
"website": website,
"main_object": self.env["ir.ui.view"].browse()
"main_object": self.env["ir.ui.view"].browse(),
"languages": [("en_US", "English")],
"lang": "en_US",
})
self.assertIn(
'<!DOCTYPE ', res.decode('UTF-8'),
Expand Down

0 comments on commit 7bc44ab

Please sign in to comment.