tests: fix mock user object

This commit is contained in:
Frédéric Péters 2015-11-25 15:25:13 +01:00
parent d283175f11
commit 405b41020c
1 changed files with 4 additions and 0 deletions

View File

@ -251,6 +251,8 @@ def test_current_forms_cell_render():
class MockUser(object):
email = 'foo@example.net'
def is_authenticated(self):
return True
context['user'] = MockUser()
# default is to get current forms from all wcs sites
@ -311,6 +313,8 @@ def test_current_drafts_cell_render():
context = Context({'synchronous': True})
class MockUser(object):
email = 'foo@example.net'
def is_authenticated(self):
return True
context['user'] = MockUser()
context['synchronous'] = True # to force fresh content