def test_contains_url(self): test_url = "https://example.com/" info = get_info("title", "descr", "photo_url.png", test_url) self.assertIn("window.open('" + test_url + "'", info, "Test URL not in info")
def test_contains_photo_url(self): test_url = "data\/photos\/v_platz.jpg" info = get_info("title", "descr", test_url, "https://example.com/") self.assertIn("src='" + test_url + "'", info, "Test photo URL not in info")
def test_contains_title(self, test_title): info = get_info(test_title, "descr", "url.png", "https://example.com/") self.assertIn("<h1>" + test_title + "</h1>", info, "Test tile not in info")
def test_contains_description(self, test_descr): info = get_info("title", test_descr, "url.jpg", "https://example.com/") self.assertIn("<p>" + test_descr + "</p>", info, "Test description not in info")
def test_is_html(self): info = get_info("title", "descr", "url.jpg", "https://example.com/") self.assertIn("<html>", info, "No html start tag in info") self.assertIn("</html>", info, "No html closing tag in info")