Nomi78600's picture
main
36ba1af
raw
history blame contribute delete
729 Bytes
from django.test import TestCase
from django.urls import reverse
class CoreViewsTestCase(TestCase):
def test_home_view_status_code(self):
response = self.client.get(reverse('home'))
self.assertEqual(response.status_code, 200)
def test_home_view_uses_correct_template(self):
response = self.client.get(reverse('home'))
self.assertTemplateUsed(response, 'core/home.html')
def test_about_view_status_code(self):
response = self.client.get(reverse('about'))
self.assertEqual(response.status_code, 200)
def test_about_view_uses_correct_template(self):
response = self.client.get(reverse('about'))
self.assertTemplateUsed(response, 'core/about.html')