Skip to content
Snippets Groups Projects
Commit b3424501df0a authored by Arnaud Vergnet's avatar Arnaud Vergnet :sun_with_face:
Browse files

test: add siteinfo test

parent 56a857a63c3a
No related branches found
No related tags found
1 merge request!62tests: improve coverage
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
from test.util import ApiBaseTC from test.util import ApiBaseTC
class ApiCurrentUserTC(ApiBaseTC): class ApiSiteinfoTC(ApiBaseTC):
def test_current_user_returns_user_as_json(self): def test_siteinfo(self):
self.login_request()
response = self.webapp.get( response = self.webapp.get(
...@@ -22,4 +21,4 @@ ...@@ -22,4 +21,4 @@
response = self.webapp.get( response = self.webapp.get(
self.get_api_path("current-user"), headers=self.custom_headers, status=200 self.get_api_path("siteinfo"), headers=self.custom_headers, status=200
).json ).json
...@@ -24,14 +23,5 @@ ...@@ -24,14 +23,5 @@
).json ).json
assert response["login"] == self.admlogin assert "info" in response
assert response["dcTitle"] == self.admlogin assert "registry" in response
assert isinstance(response["eid"], int) assert "gc" in response
def test_current_user_anonymous(self):
response = self.webapp.get(
self.get_api_path("current-user"), headers=self.custom_headers, status=200
).json
assert response["login"] == "anon"
assert response["dcTitle"] == "anon"
assert isinstance(response["eid"], int)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment