Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

admin profile test #427

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions tests/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ def test_post_register(self):

compare_post_request("profile", data, test_name = "profile2", headers = headers, route_parameters = [], files = None, test_type = test_type)

#login as admin to tes profile endpoint for an admin user
logininfo = {'email' : '[email protected]',
'password' : 'test'}
login_with(logininfo, 1)

compare_get_request("/profile", headers = headers, route_parameters = [], test_type = test_type, comparison_type = "json", test_name="admin_get_profile", fields=["name", "username", "password", "email", "affiliation", "graphUri", "isAdmin", "isMember"])

#log back in as a regular user
logininfo = {'email' : '[email protected]',
'password' : 'test'}
login_with(logininfo, 1)
test_print("test_post_login completed")

#compare_get_request("/logout")
# test_print("logout started")
# data={
Expand Down