Skip to content

Commit

Permalink
Remove User interaction from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leportella committed Feb 13, 2019
1 parent 1c489d9 commit a4bbd25
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nativeauthenticator/tests/test_authenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ async def test_create_user(is_admin, open_signup, expected_authorization,

auth.get_or_create_user('johnsnow', 'password')
user_info = UserInfo.find(app.db, 'johnsnow')
user = User.find(app.db, 'johnsnow')
assert user_info.username == 'johnsnow'
assert user.name == 'johnsnow'
assert user_info.is_authorized == expected_authorization


Expand Down Expand Up @@ -163,7 +161,7 @@ async def test_delete_user(tmpcwd, app):
auth = NativeAuthenticator(db=app.db)
auth.get_or_create_user('johnsnow', 'password')

user = User.find(app.db, 'johnsnow')
user = type('User', (), {'name': 'johnsnow'})
auth.delete_user(user)

user_info = UserInfo.find(app.db, 'johnsnow')
Expand Down

0 comments on commit a4bbd25

Please sign in to comment.