diff --git a/apiserver_tests/context.py b/tests/apiserver_tests/context.py similarity index 100% rename from apiserver_tests/context.py rename to tests/apiserver_tests/context.py diff --git a/tests/apiserver_tests/test_put.py b/tests/apiserver_tests/test_put.py new file mode 100644 index 0000000000000000000000000000000000000000..3c435a8f450fc4ccce4f3c3c75a84b2a570ae9fa --- /dev/null +++ b/tests/apiserver_tests/test_put.py @@ -0,0 +1,12 @@ +# These Tests check if the PUT calls work as intended, checking both valid puts and invalid puts + +from fastapi.testclient import TestClient + +from context import apiserver +from context import storage + +client = TestClient(apiserver.app) + +# PUT a new dataset, store the id in global variable, verify via a GET if it worked + +# PUT an invalid type (i.e. a type not in the enum) diff --git a/apiserver_tests/test_responsiveness.py b/tests/apiserver_tests/test_responsiveness.py similarity index 86% rename from apiserver_tests/test_responsiveness.py rename to tests/apiserver_tests/test_responsiveness.py index 7838446a688a0a7daa7e38779c6821e51ff2b954..04cde634961b79c5d7cebc7fa53bae707b1c5d60 100644 --- a/apiserver_tests/test_responsiveness.py +++ b/tests/apiserver_tests/test_responsiveness.py @@ -17,4 +17,10 @@ def test_root(): def test_types(): for location_type in storage.LocationDataType: rsp = client.get('/' + location_type.value) - assert rsp.status_code >= 200 and rsp.status_code < 300 # any 200 response is fine, as a get to the datatypes should not return any error \ No newline at end of file + assert rsp.status_code >= 200 and rsp.status_code < 300 # any 200 response is fine, as a get to the datatypes should not return any error + +# PUT a new dataset, store the id in global variable + +# GET the specific dataset + +# DELETE the specific dataset