]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/blobdiff - tests/test_wradmin.py
Add test_gasthaus_view.
[philipp/winterrodeln/wradmin.git] / tests / test_wradmin.py
index 7562803ab59bed4cee36e0d64cca2048c29a57b1..7e6fdefc6c2da64e79015cb103af53c9c7961ade 100644 (file)
@@ -56,6 +56,30 @@ class TestDbWradmin(WradminTestBase):
         soup = bs4.BeautifulSoup(result.data, 'html.parser')
         self.assertEqual(soup.title.text, 'Rodelbahnberichte')
 
+    def test_bericht_view(self):
+        result = self.app.get('/bericht/view/19591')
+        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, 'Rodelbahnbericht')
+        self.assertIn('Brandstatt Alm', str(soup.table))
+
+    def test_gasthaus_list(self):
+        result = self.app.get('/gasthaus/list')
+        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, '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)