]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/commitdiff
Add test_rodelbahn_view.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Tue, 24 Oct 2017 21:17:19 +0000 (21:17 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Tue, 24 Oct 2017 21:17:19 +0000 (21:17 +0000)
git-svn-id: http://www.winterrodeln.org/svn/wradmin/trunk@2725 7aebc617-e5e2-0310-91dc-80fb5f6d2477

tests/test_wradmin.py

index 7e6fdefc6c2da64e79015cb103af53c9c7961ade..4c691b0be950b0b891c748768c8473029c121d89 100644 (file)
@@ -90,3 +90,11 @@ class TestDbWradmin(WradminTestBase):
         self.assertIsNotNone(table)
         rows = table.find_all('tr')
         self.assertEqual(len(rows), 9+1)
+
+    def test_rodelbahn_view(self):
+        result = self.app.get('/rodelbahn/view/926')
+        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, 'Rodelbahn')
+        self.assertIn('Hühnerspiel', str(soup))