make unpermitted attribute handling in Users.update more specific

This commit is contained in:
dandds
2018-10-16 09:37:59 -04:00
parent ab42245797
commit 8af23fda36
2 changed files with 7 additions and 3 deletions

View File

@@ -79,5 +79,7 @@ def test_update_user():
def test_update_user_with_dod_id():
new_user = Users.create(DOD_ID, "developer")
with pytest.raises(UnauthorizedError):
with pytest.raises(UnauthorizedError) as excinfo:
Users.update(new_user, {"dod_id": "1234567890"})
assert "dod_id" in str(excinfo.value)