def test_cv_page_returns_correct_html(self): request = HttpRequest() response = cv_page(request) html = response.content.decode('utf8') self.assertTrue(html.startswith("\n<html>")) self.assertIn('<title> Bridging Coursework </title>', html) self.assertTrue(html.endswith('</html>'))
def test_cv_page_returns_correct_html(self): request = HttpRequest() response = cv_page(request) html = response.content.decode('utf-8') self.assertTrue(html.startswith('\n<html>')) self.assertIn("<title>Thomas Mills</title>", html) self.assertTrue(html.endswith('</html>'))
def test_each_entry_displays_correctly(self): request = HttpRequest() response = cv_page(request) html = response.content.decode('utf-8') for entry in CVEntry.objects.all(): self.assertIn(entry.title, html) self.assertIn(entry.text, html) self.assertNotIn(entry.author, html) self.assertNotIn(entry.created_date, html) self.assertNotIn(entry.pk, html) self.assertNotIn(entry.published_date, html)
def test_cv_page_contains_a_skills_section(self): request = HttpRequest() response = cv_page(request) html = response.content.decode('utf8') self.assertIn('<h4>SKILLS</h4>', html)
def test_cv_page_contains_a_career_section(self): request = HttpRequest() response = cv_page(request) html = response.content.decode('utf8') self.assertIn('<h4>CAREER HISTORY</h4>', html)
def test_cv_page_contains_a_eduction_section(self): request = HttpRequest() response = cv_page(request) html = response.content.decode('utf8') self.assertIn('<h4>EDUCATION</h4>', html)
def test_cv_page_returns_correct_title(self): request = HttpRequest() response = cv_page(request) html = response.content.decode('utf8') self.assertIn('<title>Anandbir\'s Website</title>', html)
def test_cv_page_returns_correct_html(self): request = HttpRequest() response = cv_page(request) html = response.content.decode('utf8') self.assertIn('<div class="cv">', html) self.assertTrue(html.endswith('</html>'))