'Test redirect function which should redirect the user after a
succesfull signin.'

def test_signin_redirect(self):

    self.assertEqual(signin_redirect(redirect='/accounts/'), '/accounts/')
    user = get_user_model().objects.get(pk=1)
    self.assertEqual(signin_redirect(user=user), ('/accounts/%s/' % user.username))
    self.assertEqual(signin_redirect(), settings.LOGIN_REDIRECT_URL)
