Download:
child 169:216b7662fea9
parent 167:2982debb99be
168:fc6392f4acdb
Anton Shestakov <av6@dwimlabs.net>, Wed, 20 Jul 2016 09:34:13 +0800
tests: test check page

1 файлов изменено, 14 вставок(+), 0 удалений(-) [+]
tests/test_viewer.py file | annotate | diff | comparison | revisions
--- a/tests/test_viewer.py Wed Jul 20 09:33:43 2016 +0800
+++ b/tests/test_viewer.py Wed Jul 20 09:34:13 2016 +0800
@@ -76,6 +76,20 @@
assert '1 error' in response.body
assert '1 warning' in response.body
+ def test_check(self):
+ response = self.fetch('/butt.cloud/cyber/wizard-attack/latest')
+ assert response.code == 404
+ assert 'online linter' in response.body
+
+ response = self.fetch('/example.com/alice/test-viewer/latest')
+ assert response.code == 200
+ assert '1 error' in response.body
+ assert '1 warning' in response.body
+
+ response = self.fetch('/example.com/alice/test-viewer/latest/raw')
+ assert response.code == 200
+ assert response.headers['Content-Type'] == 'text/plain; charset=utf-8'
+
def test_status(self):
response = self.fetch('/butt.cloud/cyber/wizard-attack/status.svg')
assert response.code == 404