Download:
child 38:4326af080387
parent 36:63c9cb7c6bb8
37:bbce1e45da1e
Anton Shestakov <av6@dwimlabs.net>, Sat, 18 Jun 2016 18:56:40 +0800
tests: test index page and a non-existent page that gives 404

1 файлов изменено, 8 вставок(+), 0 удалений(-) [+]
tests/test_viewer.py file | annotate | diff | comparison | revisions
--- a/tests/test_viewer.py Sat Jun 18 18:56:12 2016 +0800
+++ b/tests/test_viewer.py Sat Jun 18 18:56:40 2016 +0800
@@ -14,3 +14,11 @@
database.connect = Mock()
database.disconnect = Mock()
return CandolintViewer()
+
+ def test_index(self):
+ response = self.fetch('/')
+ assert response.code == 200
+
+ def test_404(self):
+ response = self.fetch('/nobodyhere')
+ assert response.code == 404