Skip to content

Commit

Permalink
UT: Fix AuthenticationService.needs_registration() tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyamalviya committed Apr 3, 2023
1 parent 05bec12 commit 360ad96
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,15 @@ def authentication_facade(


def test_needs_registration__true(authentication_facade: AuthenticationFacade):
authentication_facade._datastore.find_user.return_value = False
assert authentication_facade.needs_registration()


def test_needs_registration__false(
monkeypatch,
authentication_facade: AuthenticationFacade,
):
User(username=USERNAME, password=PASSWORD).save()
authentication_facade._datastore.find_user.return_value = True
assert not authentication_facade.needs_registration()


Expand Down

0 comments on commit 360ad96

Please sign in to comment.