You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 lines
1.1 KiB

from django.urls import reverse
from rest_framework.test import APITestCase
class ApiURLResolutionTests(APITestCase):
"""
Test suite to ensure general api app endpoints resolve and execute cleanly.
"""
def test_api_home_endpoint(self):
"""Test home endpoint is accessible via direct path"""
response = self.client.get('/api/test/')
self.assertLess(response.status_code, 500)
def test_api_countries_endpoint(self):
"""Test countries endpoint is accessible via direct path"""
response = self.client.get('/api/test/countries/')
self.assertLess(response.status_code, 500)
def test_comment_list_endpoint(self):
"""Test comment list endpoint is accessible"""
url = reverse('comment-list')
response = self.client.get(url)
self.assertLess(response.status_code, 500)
def test_appversion_list_endpoint(self):
"""Test app version list endpoint is accessible"""
url = reverse('appversion-list')
response = self.client.get(url)
self.assertLess(response.status_code, 500)