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.
15 lines
469 B
15 lines
469 B
from django.test import TestCase
|
|
from django.urls import resolve, reverse
|
|
|
|
from index import views
|
|
|
|
|
|
# Create your tests here.
|
|
class IndexPageTest(TestCase):
|
|
|
|
def test_index_route(self):
|
|
response = self.client.get(reverse('index:index'))
|
|
|
|
self.assertEqual(response.status_code, 200)
|
|
self.assertEqual(response.resolver_match.func.__name__, views.IndexView.__name__)
|
|
self.assertTemplateUsed(response, template_name='index/index.html')
|
|
|