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

tests/test_wradmin.py

index 0f7911e8d0f218eed53e037d54d23568efe2929f..7e6fdefc6c2da64e79015cb103af53c9c7961ade 100644 (file)
@@ -72,6 +72,14 @@ class TestDbWradmin(WradminTestBase):
         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)