Exemplo n.º 1
0
 def test_post_list_returns_correct_html(self):
     request = HttpRequest()
     response = cv(request)
     html = response.content.decode('utf8')
     self.assertTrue(html.strip().startswith('<html>'))
     self.assertIn("<title>Canle's CV</title>", html)
     self.assertTrue(html.strip().endswith('</html>'))
Exemplo n.º 2
0
	def test_cv_page_returns_correct_html(self):
		request = HttpRequest()
#A request object is what Django see's when the user
#browser asks for a page. 
		response = cv(request)
#Pass it our cv page view, which gives us a response. 
		html = response.content.decode('utf8')
	#	self.assertTrue(html.startswith('<html>'))
		self.assertIn('<title>Cv Page</title>', html)
		self.assertTrue(html.strip().endswith('</html>'))
Exemplo n.º 3
0
 def test_coding_skills(self):
     request = HttpRequest()
     response = views.cv(request)
     html = response.content.decode('utf8')
     self.assertIn('<h3>Coding Skills</h3>', html)
Exemplo n.º 4
0
 def test_linkedin(self):
     request = HttpRequest()
     response = views.cv(request)
     html = response.content.decode('utf8')
     self.assertIn('linkedin.com', html)
Exemplo n.º 5
0
 def test_achievements(self):
     request = HttpRequest()
     response = views.cv(request)
     html = response.content.decode('utf8')
     self.assertIn('<h3>Other Achievements</h3>', html)
Exemplo n.º 6
0
 def test_email(self):
     request = HttpRequest()
     response = views.cv(request)
     html = response.content.decode('utf8')
     self.assertIn('*****@*****.**', html)
Exemplo n.º 7
0
 def test_contact_details(self):
     request = HttpRequest()
     response = views.cv(request)
     html = response.content.decode('utf8')
     self.assertIn('<h3>Contact Details</h3>', html)
Exemplo n.º 8
0
 def test_exists_header(self):
     request = HttpRequest()
     response = views.cv(request)
     html = response.content.decode('utf8')
     self.assertIn('<h1>Katie Potts\' Blog</h1>', html)
Exemplo n.º 9
0
 def test_html_match(self):
     request = HttpRequest()
     response = views.cv(request)
     html = response.content.decode('utf8')
     self.assertIn('<html>', html)
     self.assertIn('</html>', html)
Exemplo n.º 10
0
 def test_academic_record(self):
     request = HttpRequest()
     response = views.cv(request)
     html = response.content.decode('utf8')
     self.assertIn('<h3>Academics</h3>', html)