Fix exception occuring on Admin demotion (#1799)

* Fix an exception that occurred when demoting an Admin user
* Fix the response from the above request from returning a list instead of a dict
* Closes #1794
This commit is contained in:
Kevin Chung
2021-02-09 04:03:04 -05:00
committed by GitHub
parent 0a5a886ac6
commit fa7316722e
3 changed files with 28 additions and 6 deletions

View File

@@ -308,7 +308,7 @@ def test_api_user_patch_admin():
},
)
assert r.status_code == 200
user_data = r.get_json()["data"][0]
user_data = r.get_json()["data"]
assert user_data["country"] == "US"
assert user_data["verified"] is True
destroy_ctfd(app)