From 91d02edb800d93612dde0ce7d7f737fdb4bb6371 Mon Sep 17 00:00:00 2001 From: Ivor Bosloper Date: Wed, 22 Nov 2017 10:05:34 +0100 Subject: [PATCH] Small test improvement --- tests/tests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/tests.py b/tests/tests.py index 1a277f6..37267a9 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -463,10 +463,12 @@ def test_migrate_from_login(self): from django.contrib.sessions.backends.db import SessionStore as DjangoSessionStore try: call_command('migrate', 'sessions') + call_command('clearsessions') user = User.objects.create_user('bouke', '', 'secret') session = DjangoSessionStore() session['_auth_user_id'] = user.id session.save() + self.assertEqual(Session.objects.count(), 0) self.assertEqual(DjangoSession.objects.count(), 1) call_command('migratesessions') new_sessions = list(Session.objects.all())