Skip to content
Snippets Groups Projects
Commit b13bd5be authored by I. Nüske's avatar I. Nüske
Browse files

DOC: Fix docstrings

parent 842baefb
No related branches found
No related tags found
1 merge request!10Draft: Tests for non-purge delete
...@@ -37,8 +37,7 @@ class TestClassCreateFDO: # pylint: disable=fixme ...@@ -37,8 +37,7 @@ class TestClassCreateFDO: # pylint: disable=fixme
f'{PATH_LISTREPO}test_http_repositories[{service["url"]}]'])]) f'{PATH_LISTREPO}test_http_repositories[{service["url"]}]'])])
for service in services]) for service in services])
def test_http_create_fdo(self, service_url: str): def test_http_create_fdo(self, service_url: str):
"""Tests creation of a fdo with a post request, adds data on """Tests creation of a fdo with a post request.
created fdos to created_fdos[<service>].
Parameters Parameters
---------- ----------
...@@ -80,8 +79,7 @@ class TestClassCreateFDO: # pylint: disable=fixme ...@@ -80,8 +79,7 @@ class TestClassCreateFDO: # pylint: disable=fixme
for service in services]) for service in services])
def test_client_create_fdo(self, service_url: str): def test_client_create_fdo(self, service_url: str):
"""Tests creation of a fdo with an unauthenticated client using """Tests creation of a fdo with an unauthenticated client using
assertions_helper(). Adds the locations of created fdos to assertions_helper().
created_fdos[<service>].
Parameters Parameters
---------- ----------
......
...@@ -36,8 +36,6 @@ PATH_LOCAL_PURGE = PATH_FILE + "::TestClassPurgeFDO::" ...@@ -36,8 +36,6 @@ PATH_LOCAL_PURGE = PATH_FILE + "::TestClassPurgeFDO::"
f"{PATH_LOGGING}test_http_log_createfdo"]) f"{PATH_LOGGING}test_http_log_createfdo"])
class TestClassPurgeFDO: # pylint: disable=fixme class TestClassPurgeFDO: # pylint: disable=fixme
"""Basic Tests for /fdo delete calls with purge=true""" """Basic Tests for /fdo delete calls with purge=true"""
# ToDo: DeleteFDO on everything, then check, logs, then purge all etc.,
# create -> create check -> delete -> delete check -> purge
@pytest.mark.parametrize("service_url", [pytest.param(service["url"], marks=[ @pytest.mark.parametrize("service_url", [pytest.param(service["url"], marks=[
pytest.mark.dependency(scope='session', depends=[ pytest.mark.dependency(scope='session', depends=[
...@@ -45,7 +43,7 @@ class TestClassPurgeFDO: # pylint: disable=fixme ...@@ -45,7 +43,7 @@ class TestClassPurgeFDO: # pylint: disable=fixme
for service in services]) for service in services])
def test_http_purge_fdo(self, service_url: str): def test_http_purge_fdo(self, service_url: str):
"""Tests purge of a fdo with a delete request to /fdo/... with """Tests purge of a fdo with a delete request to /fdo/... with
purge=true. Deletes some of the fdos saved in created_fdos[<service>]. purge=true.
Parameters Parameters
---------- ----------
...@@ -54,7 +52,7 @@ class TestClassPurgeFDO: # pylint: disable=fixme ...@@ -54,7 +52,7 @@ class TestClassPurgeFDO: # pylint: disable=fixme
for example "https://manager.testbed.pid.gwdg.de/api/v1" for example "https://manager.testbed.pid.gwdg.de/api/v1"
""" """
urls = [] urls = []
# delete a fdo in every available repository # purge a fdo in every available repository
try: try:
response = requests.get(service_url + "/repositories", timeout=10) response = requests.get(service_url + "/repositories", timeout=10)
repositories = json.loads(response.content.decode())['data'] repositories = json.loads(response.content.decode())['data']
...@@ -84,7 +82,6 @@ class TestClassPurgeFDO: # pylint: disable=fixme ...@@ -84,7 +82,6 @@ class TestClassPurgeFDO: # pylint: disable=fixme
for service in services]) for service in services])
def test_client_purge_fdo(self, service_url: str): def test_client_purge_fdo(self, service_url: str):
"""Tests purge of a fdo with an unauthenticated client. """Tests purge of a fdo with an unauthenticated client.
Deletes some of the fdos saved in created_fdos[<service>].
Parameters Parameters
---------- ----------
......
...@@ -191,9 +191,7 @@ class TestClassLogEvents: ...@@ -191,9 +191,7 @@ class TestClassLogEvents:
Response from the /logging request. Response from the /logging request.
created_fdo : dict created_fdo : dict
Dictionary containing information obtained during the Dictionary containing information obtained during the
creation of FDOs. Includes FDO repo, url and creation time creation of FDOs. Includes FDO repo, url and creation time.
and should be saved to test_utils.created_fdos by the test
that created the object.
""" """
content = json.loads(response.content.decode()) content = json.loads(response.content.decode())
for logentry in content['data']: for logentry in content['data']:
...@@ -223,9 +221,7 @@ class TestClassLogEvents: ...@@ -223,9 +221,7 @@ class TestClassLogEvents:
Response from the /logging request. Response from the /logging request.
created_fdo : dict created_fdo : dict
Dictionary containing information obtained during the Dictionary containing information obtained during the
creation of FDOs. Includes FDO repo, url and creation time creation of FDOs. Includes FDO repo, url and creation time.
and should be saved to test_utils.created_fdos by the test
that created the object.
""" """
content = json.loads(response.content.decode()) content = json.loads(response.content.decode())
for logentry in content['data']: for logentry in content['data']:
......
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