Esempio n. 1
0
 def test_returns_correct_html(self):
     request = HttpRequest()
     response = index(request)        
     index_html = render_to_string('index.html')
     self.assertEqual(response.content, index_html)
Esempio n. 2
0
 def test_returns_correct_html(self):
     request = HttpRequest()
     response = index(request)
     index_html = render_to_string('index.html')
     self.assertEqual(response.content, index_html)
Esempio n. 3
0
 def test_index(self):
     request = HttpRequest()
     response = index(request)
     self.assertTrue(response.content.startswith('<!DOCTYPE html>'))
     self.assertIn('<title>Aakashlabs</title>', response.content)
     self.assertTrue(response.content.strip().endswith('</html>'))
Esempio n. 4
0
 def test_index(self):
     request = HttpRequest()
     response = index(request)
     self.assertTrue(response.content.startswith('<!DOCTYPE html>'))
     self.assertIn('<title>Aakashlabs</title>', response.content)
     self.assertTrue(response.content.strip().endswith('</html>'))