From 34c97e05fe8a623a799cd31519b7982dae579368 Mon Sep 17 00:00:00 2001 From: Laurent LAPORTE Date: Thu, 21 Dec 2023 21:48:10 +0100 Subject: [PATCH] test: remove Locust dependency and unit tests (not really useful) --- requirements-test.txt | 1 - tests/locust/__init__.py | 0 tests/locust/locustfile.py | 20 -------------------- 3 files changed, 21 deletions(-) delete mode 100644 tests/locust/__init__.py delete mode 100644 tests/locust/locustfile.py diff --git a/requirements-test.txt b/requirements-test.txt index c752146feb..10e44592a1 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,5 +1,4 @@ -r requirements.txt checksumdir~=1.2.0 -locust~=2.7.0 pytest~=6.2.5 pytest-cov~=4.0.0 \ No newline at end of file diff --git a/tests/locust/__init__.py b/tests/locust/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/locust/locustfile.py b/tests/locust/locustfile.py deleted file mode 100644 index 53ad82bf5f..0000000000 --- a/tests/locust/locustfile.py +++ /dev/null @@ -1,20 +0,0 @@ -import time - -from locust import HttpUser, between, task - - -class AdminUser(HttpUser): - wait_time = between(1, 2.5) - - @task - def get_studies(self): - res = self.client.get("/studies") - studies = res.json() - for study_id in studies: - self.client.get(f"/studies/{study_id}", params={"depth": -1}) - time.sleep(0.2) - - def on_start(self): - res = self.client.post("/login", data={"username": "admin", "password": "admin"}) - credentials = res.json() - self.client.headers.update({"Authorization": f'Bearer {credentials["access_token"]}'})