diff --git a/backend/tests/api/user/test_users.py b/backend/tests/api/user/test_users.py deleted file mode 100644 index 9d9a251b..00000000 --- a/backend/tests/api/user/test_users.py +++ /dev/null @@ -1,25 +0,0 @@ -import pytest - - -@pytest.mark.django_db -class TestUsers: - api_endpoint = '/api/users/users/' - - def get_api_endpoint_with_id(self, id): - return f'{self.api_endpoint}{id}/' - - def test_get_users(self, api_client): - response = api_client.get(self.api_endpoint) - - assert response.status_code == 200 - data = response.data - assert isinstance(data, list) - - def test_retrieve_user(self, auth_api_client, user): - url = self.get_api_endpoint_with_id(user.id) - - response = auth_api_client.get(url) - - assert response.status_code == 200 - data = response.data - assert data['email'] == user.email diff --git a/backend/tests/conftest.py b/backend/tests/conftest.py index 9f69d39f..7ef51caa 100644 --- a/backend/tests/conftest.py +++ b/backend/tests/conftest.py @@ -8,7 +8,7 @@ @pytest.fixture def user(): """Creates and returns a user.""" - return User.objects.create_user(email='test@test.com', password='testpass') + return User.objects.create_user(email='test@test.com', password='testpass') # type: ignore @pytest.fixture