hubtraf user login doesn't raise exceptions anymore

This commit is contained in:
GeorgianaElena
2020-07-21 16:58:54 +03:00
parent 3e62ee347a
commit c79df23873

View File

@@ -17,9 +17,9 @@ async def test_admin_login():
async with User(username, hub_url, partial(login_dummy, password=password)) as u:
await u.login()
# If user is not logged in, this will raise an exception
await u.ensure_server_simulate()
@pytest.mark.asyncio
@pytest.mark.parametrize(
"username, password",
@@ -35,11 +35,7 @@ async def test_unsuccessful_login(username, password):
"""
hub_url = 'http://localhost'
try:
async with User(username, hub_url, partial(login_dummy, password="")) as u:
await u.login()
except Exception:
# This is what we except to happen
pass
else:
raise
user_logged_in = await u.login()
assert user_logged_in == False