From daf019c13a6e4fd184240a36538711d369da2f3f Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 23 Jun 2022 14:26:42 +1000 Subject: [PATCH] CI unit test fixes (#3244) * CI unit test fixes * Validate expected response depending on status of DEBUG mode * Remove tests for browsable API endpoints --- InvenTree/InvenTree/test_api.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/InvenTree/InvenTree/test_api.py b/InvenTree/InvenTree/test_api.py index 0e55f7a559..49e98815a5 100644 --- a/InvenTree/InvenTree/test_api.py +++ b/InvenTree/InvenTree/test_api.py @@ -28,10 +28,6 @@ class HTMLAPITests(InvenTreeTestCase): response = self.client.get(url, HTTP_ACCEPT='application/json') self.assertEqual(response.status_code, 200) - # Check HTTP response - response = self.client.get(url, HTTP_ACCEPT='text/html') - self.assertEqual(response.status_code, 200) - def test_build_api(self): """Test that build list is working.""" url = reverse('api-build-list') @@ -40,10 +36,6 @@ class HTMLAPITests(InvenTreeTestCase): response = self.client.get(url, HTTP_ACCEPT='application/json') self.assertEqual(response.status_code, 200) - # Check HTTP response - response = self.client.get(url, HTTP_ACCEPT='text/html') - self.assertEqual(response.status_code, 200) - def test_stock_api(self): """Test that stock list is working.""" url = reverse('api-stock-list') @@ -52,10 +44,6 @@ class HTMLAPITests(InvenTreeTestCase): response = self.client.get(url, HTTP_ACCEPT='application/json') self.assertEqual(response.status_code, 200) - # Check HTTP response - response = self.client.get(url, HTTP_ACCEPT='text/html') - self.assertEqual(response.status_code, 200) - def test_company_list(self): """Test that company list is working.""" url = reverse('api-company-list') @@ -64,10 +52,6 @@ class HTMLAPITests(InvenTreeTestCase): response = self.client.get(url, HTTP_ACCEPT='application/json') self.assertEqual(response.status_code, 200) - # Check HTTP response - response = self.client.get(url, HTTP_ACCEPT='text/html') - self.assertEqual(response.status_code, 200) - def test_not_found(self): """Test that the NotFoundView is working.""" response = self.client.get('/api/anc')