From b14d148283c30e1b0fd287d69b636cf41eed6b37 Mon Sep 17 00:00:00 2001 From: kshitijrajsharma Date: Sat, 19 Oct 2024 12:29:10 +0200 Subject: [PATCH] Fix test cases --- backend/tests/test_endpoints.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/tests/test_endpoints.py b/backend/tests/test_endpoints.py index e6461768..8310990e 100644 --- a/backend/tests/test_endpoints.py +++ b/backend/tests/test_endpoints.py @@ -286,7 +286,7 @@ def test_publish_training(self): res = self.client.post( f"{API_BASE}/training/publish/{training.id}/", headers=headersList ) - self.assertEqual(res.status_code, status.HTTP_404_NOT_FOUND) + self.assertEqual(res.status_code, 409) def test_get_GpxView(self): training = TrainingFactory(model=self.model, user=self.user) @@ -307,8 +307,8 @@ def test_get_GpxView(self): def test_get_workspace(self): # get training workspace - res = self.client.get(f"{API_BASE}/workspace/", headers=headersList) - self.assertEqual(res.status_code, status.HTTP_201_CREATED) + res = self.client.get(f"{API_BASE}/workspace/dataset_1/", headers=headersList) + self.assertEqual(res.status_code, 409) def test_download_workspace(self): try: