def test_home_page_from_fixture(self): ''' Check home page displays data from fixture ''' request = HttpRequest() response = home(request) # check our contact information appears on the page self.assertIn('Oleksandr', response.content.decode()) self.assertIn('Vinnichuk', response.content.decode())
def test_correct_html(self): ''' Check home page returns correct html ''' request = HttpRequest() response = home(request) self.assertIn(b'42 Coffee Cups Test Assignment', response.content) # check we've used the right template self.assertTemplateUsed(response, 'home.html')