예제 #1
0
 def testPage2Footer(self):
     request = HttpRequest()
     response = page2_page(request)
     html = response.content.decode('utf8')
     self.assertIn(
         '<p class="text-muted" id="footerText">Page By Julian Jones</p>',
         html, 'it broke')
예제 #2
0
 def testPage2Button(self):
     request = HttpRequest()
     response = page2_page(request)
     html = response.content.decode('utf8')
     self.assertIn(
         '<button type="submit" class="btn btn-primary" id="submit" onclick="storeChoice()">Store your choice!</button>',
         html, 'it broke')
예제 #3
0
 def testPage2Label(self):
     request = HttpRequest()
     response = page2_page(request)
     html = response.content.decode('utf8')
     self.assertIn(
         '<label for="inputBox">You escape the room, and get the opportunity to kill an unsuspecting guard. Do you?</label>',
         html, 'it broke')
예제 #4
0
 def testPage2NavContext4(self):
     request = HttpRequest()
     response = page2_page(request)
     html = response.content.decode('utf8')
     self.assertIn(
         '<a class="nav-link" href="page2.html" id="page2Anchor">Question 2</a>',
         html, 'it broke')
예제 #5
0
 def testPage2NavContext1(self):
     request = HttpRequest()
     response = page2_page(request)
     html = response.content.decode('utf8')
     self.assertIn(
         '<nav class="navbar navbar-expand-lg navbar-dark bg-dark">', html,
         'it broke')
예제 #6
0
 def testPage2Img(self):
     request = HttpRequest()
     response = page2_page(request)
     html = response.content.decode('utf8')
     self.assertIn('<img id="outputImg" alt="Image" title="Image">', html,
                   'it broke')
예제 #7
0
 def testPage2Input(self):
     request = HttpRequest()
     response = page2_page(request)
     html = response.content.decode('utf8')
     self.assertIn('<input type="text" id="inputBox">', html, 'it broke')
예제 #8
0
 def testPage2H1(self):
     request = HttpRequest()
     response = page2_page(request)
     html = response.content.decode('utf8')
     self.assertIn('<h1 id="banner"></h1>', html, 'it broke')