Skip to content

Commit b6c4850

Browse files
committed
Merged format tests into one file
1 parent 2a789f8 commit b6c4850

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

tests/test_datetime.py

-14
This file was deleted.

tests/test_hostname.py tests/test_format.py

+11
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
from fastjsonschema import JsonSchemaException
44

55

6+
exc = JsonSchemaException('data must be date-time')
7+
@pytest.mark.parametrize('value, expected', [
8+
('', exc),
9+
('bla', exc),
10+
('2018-02-05T14:17:10.00Z', '2018-02-05T14:17:10.00Z'),
11+
('2018-02-05T14:17:10Z', '2018-02-05T14:17:10Z'),
12+
])
13+
def test_datetime(asserter, value, expected):
14+
asserter({'type': 'string', 'format': 'date-time'}, value, expected)
15+
16+
617
exc = JsonSchemaException('data must be hostname')
718
@pytest.mark.parametrize('value, expected', [
819
('', exc),

0 commit comments

Comments
 (0)