]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/commitdiff
Add test_rodelbahn_list.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Mon, 23 Oct 2017 19:23:14 +0000 (19:23 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Mon, 23 Oct 2017 19:23:14 +0000 (19:23 +0000)
git-svn-id: http://www.winterrodeln.org/svn/wradmin/trunk@2718 7aebc617-e5e2-0310-91dc-80fb5f6d2477

tests/test_wradmin.py

index 7264e8489157d19d9ca03f1562d848dc4b9eae41..7562803ab59bed4cee36e0d64cca2048c29a57b1 100644 (file)
@@ -55,3 +55,14 @@ class TestDbWradmin(WradminTestBase):
         self.assertTrue(result.data.startswith(b'<!DOCTYPE html'))
         soup = bs4.BeautifulSoup(result.data, 'html.parser')
         self.assertEqual(soup.title.text, 'Rodelbahnberichte')
+
+    def test_rodelbahn_list(self):
+        result = self.app.get('/rodelbahn/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, 'Rodelbahnen')
+        table = soup.find('table')
+        self.assertIsNotNone(table)
+        rows = table.find_all('tr')
+        self.assertEqual(len(rows), 9+1)