Пример #1
0
 def testHomePageNavContext1(self):
     request = HttpRequest()
     response = home_page(request)
     html = response.content.decode('utf8')
     self.assertIn(
         '<nav class="navbar navbar-expand-lg navbar-dark bg-dark">', html,
         'it broke')
Пример #2
0
 def testHomePageNavContext3(self):
     request = HttpRequest()
     response = home_page(request)
     html = response.content.decode('utf8')
     self.assertIn(
         '<a class="nav-link" href="page1.html" id="page1Anchor">Question 1</a>',
         html, 'it broke')
Пример #3
0
 def testHomeButton(self):
     request = HttpRequest()
     response = home_page(request)
     html = response.content.decode('utf8')
     self.assertIn(
         '<button id="submit" type="submit" onclick="storeName()">Submit!</button>',
         html, 'it broke')
Пример #4
0
 def testHomeLabel(self):
     request = HttpRequest()
     response = home_page(request)
     html = response.content.decode('utf8')
     self.assertIn(
         '<label for="inputBox">What is your name, fair one?</label>', html,
         'it broke')
Пример #5
0
 def testHomeP(self):
     request = HttpRequest()
     response = home_page(request)
     html = response.content.decode('utf8')
     self.assertIn('<p id="output"></p>', html, 'it broke')
Пример #6
0
 def testHomeInput(self):
     request = HttpRequest()
     response = home_page(request)
     html = response.content.decode('utf8')
     self.assertIn('<input type="text" id="inputBox">', html, 'it broke')
Пример #7
0
 def testHomeH1(self):
     request = HttpRequest()
     response = home_page(request)
     html = response.content.decode('utf8')
     self.assertIn('<h1>Welcome Traveler!</h1>', html, 'it broke')