Commit b8cf4b1d authored by Michal Čihař's avatar Michal Čihař

Remove session cookie only if they exist

We no longer send them on registration.
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 19759d24
......@@ -49,7 +49,7 @@ class RegistrationTest(TestCase, RegistrationTestMixin):
def assert_registration(self, match=None):
url = self.assert_registration_mailbox(match)
if self.clear_cookie:
if self.clear_cookie and 'sessionid' in self.client.cookies:
del self.client.cookies['sessionid']
# Confirm account
......@@ -174,9 +174,6 @@ class RegistrationTest(TestCase, RegistrationTestMixin):
# Remove session ID from URL
url = url.split('&id=')[0]
# Delete session ID from cookies
del self.client.cookies['sessionid']
# Confirm account
response = self.client.get(url, follow=True)
self.assertRedirects(response, reverse('login'))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment