fixed admin_login in test

This commit is contained in:
Cayo Puigdefabregas 2021-02-03 10:47:35 +01:00
parent 4ec22e4e36
commit 25112f20ea
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ class BaseLiveServerTestCase(AppDependencyMixin, LiveServerTestCase):
def admin_login(self): def admin_login(self):
session = SessionStore() session = SessionStore()
session[SESSION_KEY] = self.account_id session[SESSION_KEY] = self.account.id
session[BACKEND_SESSION_KEY] = settings.AUTHENTICATION_BACKENDS[0] session[BACKEND_SESSION_KEY] = settings.AUTHENTICATION_BACKENDS[0]
session.save() session.save()
## to set a cookie we need to first visit the domain. ## to set a cookie we need to first visit the domain.