Download:
child 243:0a5072b593dc
parent 241:f5efb98791b5
242:d1f63a197c74
Anton Shestakov <av6@dwimlabs.net>, Wed, 26 Oct 2016 06:51:26 +0800
tests: test <date> elements in test_check()

1 файлов изменено, 8 вставок(+), 2 удалений(-) [+]
tests/test_viewer.py file | annotate | diff | comparison | revisions
--- a/tests/test_viewer.py Fri Oct 07 13:36:44 2016 +0800
+++ b/tests/test_viewer.py Wed Oct 26 06:51:26 2016 +0800
@@ -61,8 +61,8 @@
warnings=1,
lines=json_encode(lines),
success=True,
- started=datetime.now(),
- finished=datetime.now(),
+ started=datetime(2016, 8, 20, 2, 38, 6),
+ finished=datetime(2016, 8, 20, 2, 38, 53),
change=change,
project=project)
@@ -119,6 +119,12 @@
assert '1 warning' in response.body
assert '<a href="#">default</a>' in response.body
assert '<a href="#" class="filelink">test.py:20</a>' in response.body
+ assert ('<time datetime="2016-08-20T02:38:53Z"'
+ ' title="2016-08-20 02:38:53 UTC">'
+ '2016-08-20 02:38:53 UTC</time>') in response.body
+ assert ('<time datetime="2016-07-19T22:23+0800"'
+ ' title="2016-07-19 22:23 +0800">'
+ '2016-07-19 22:23 +0800</time>') in response.body
response = self.fetch('/example.com/alice/test-viewer/latest/raw')
assert response.code == 200