示例#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>'))
示例#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>'))
示例#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)
示例#4
0
 def test_linkedin(self):
     request = HttpRequest()
     response = views.cv(request)
     html = response.content.decode('utf8')
     self.assertIn('linkedin.com', html)
示例#5
0
 def test_achievements(self):
     request = HttpRequest()
     response = views.cv(request)
     html = response.content.decode('utf8')
     self.assertIn('<h3>Other Achievements</h3>', html)
示例#6
0
 def test_email(self):
     request = HttpRequest()
     response = views.cv(request)
     html = response.content.decode('utf8')
     self.assertIn('*****@*****.**', html)
示例#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)
示例#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)
示例#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)
示例#10
0
 def test_academic_record(self):
     request = HttpRequest()
     response = views.cv(request)
     html = response.content.decode('utf8')
     self.assertIn('<h3>Academics</h3>', html)