Refactor stuff + stricter validation for updating only ALLOWED user attrs

This commit is contained in:
Imdad Ahad
2016-11-10 13:09:25 +00:00
parent 8b64aa7e79
commit f85ee54707
3 changed files with 26 additions and 9 deletions

View File

@@ -64,11 +64,8 @@ def test_get_user_not_exists(notify_api, notify_db, notify_db_session, fake_uuid
def test_get_user_invalid_id(notify_api, notify_db, notify_db_session):
try:
with pytest.raises(DataError):
get_user_by_id(user_id="blah")
pytest.fail("DataError exception not thrown.")
except DataError:
pass
def test_delete_users(notify_api, notify_db, notify_db_session, sample_user):