1# pages/tests.py 2from django.http import HttpRequest 3from django.test import SimpleTestCase 4from django.urls import reverse 5 6 7class HomePageTests(SimpleTestCase): 8 9 def test_home_page_status_code(self): 10 response = self.client.get('/') 11 self.assertEquals(response.status_code, 200) 12 13 14 def test_home_page_does_not_contain_incorrect_html(self): 15 response = self.client.get('/') 16 self.assertNotContains( 17 response, 'Hi there! I should not be on the page.') 18