Skip to content

Commit

Permalink
Small test improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
ivorbosloper committed Nov 22, 2017
1 parent 5d2efd9 commit 91d02ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 91d02ed

Please sign in to comment.