diff --git a/testing.py b/testing.py index fa97567..ff9534f 100644 --- a/testing.py +++ b/testing.py @@ -22,7 +22,7 @@ loginPath = base_url + "/api/login" addProjectPath = base_url + "/api/project" -# Define a function to prform POST request with data and return response +# Posts the username and password to the register endpoint def register(username: string, password: string): print("Registering with username: ", username, " and password: ", password) response = requests.post( @@ -32,6 +32,7 @@ def register(username: string, password: string): return response +# Posts the username and password to the login endpoint def login(username: string, password: string): print("Logging in with username: ", username, " and password: ", password) response = requests.post( @@ -48,7 +49,6 @@ def test_login(): return response.json()["token"] -# Define a function to test the POST request def test_create_user(): response = register(username, "always_same") assert response.status_code == 200, "Registration failed"