self.assertEqual(self.client.session[SESSION_KEY], user.pk)
AssertionError: '1' != 1
accounts/tests/test_views.py
@patch('accounts.views.authenticate')
def test_gets_logged_in_seesion_if_authenticate_returns_a_user(
self, mock_authenticate
):
[...]
self.assertEqual(self.client.session[SESSION_KEY], str(user.pk))