diff --git a/tubearchivist/home/tests.py b/tubearchivist/home/tests.py deleted file mode 100644 index 218d9ad..0000000 --- a/tubearchivist/home/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase # noqa: F401 - Unused import - -# Create your tests here. diff --git a/tubearchivist/home/tests/__init__.py b/tubearchivist/home/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tubearchivist/home/tests/test_views.py b/tubearchivist/home/tests/test_views.py new file mode 100644 index 0000000..0d3bd23 --- /dev/null +++ b/tubearchivist/home/tests/test_views.py @@ -0,0 +1,42 @@ +"""All test classes""" + +from django.test import TestCase + + +class URLTests(TestCase): + """test if all expected URL are there""" + + def test_home_view(self): + """check homepage""" + response = self.client.get("/") + self.assertEqual(response.status_code, 200) + + def test_about_view(self): + """check about page""" + response = self.client.get("/about/") + self.assertEqual(response.status_code, 200) + + def test_downloads_view(self): + """check downloads page""" + response = self.client.get("/downloads/") + self.assertEqual(response.status_code, 200) + + def test_channel_view(self): + """check channel page""" + response = self.client.get("/channel/") + self.assertEqual(response.status_code, 200) + + def test_settings_view(self): + """check settings page""" + response = self.client.get("/settings/") + self.assertEqual(response.status_code, 200) + + def test_progress_view(self): + """check ajax progress endpoint""" + response = self.client.get("/downloads/progress/") + self.assertEqual(response.status_code, 200) + + def test_process_view(self): + """check process ajax endpoint""" + response = self.client.get("/process/") + self.assertEqual(response.status_code, 200)