Example #1
0
    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())
Example #2
0
    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())
Example #3
0
    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')
Example #4
0
    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')