self.assertEqual(soup.title.text, 'Gasthäuser')
self.assertIn('Meißner', str(soup.table))
+ def test_gasthaus_view(self):
+ result = self.app.get('/gasthaus/view/362')
+ self.assertEqual(result.status_code, 200)
+ self.assertTrue(result.data.startswith(b'<!DOCTYPE html'))
+ soup = bs4.BeautifulSoup(result.data, 'html.parser')
+ self.assertEqual(soup.title.text, 'Gasthaus')
+ self.assertIn('Meißner', str(soup))
+
def test_rodelbahn_list(self):
result = self.app.get('/rodelbahn/list')
self.assertEqual(result.status_code, 200)