Skip to content

Commit e903369

Browse files
committed
Added failing test case for horejsek#23
1 parent dc3ae94 commit e903369

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/test_datetime.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
import pytest
3+
4+
from fastjsonschema import JsonSchemaException
5+
6+
7+
exc = JsonSchemaException('data must be date-time')
8+
@pytest.mark.parametrize('value, expected', [
9+
('', exc),
10+
('bla', exc),
11+
('2018-02-05T14:17:10.00Z', '2018-02-05T14:17:10.00Z'),
12+
('2018-02-05T14:17:10Z', '2018-02-05T14:17:10Z'),
13+
])
14+
def test_datetime(asserter, value, expected):
15+
asserter({'type': 'string', 'format': 'date-time'}, value, expected)

0 commit comments

Comments
 (0)