Make schema generator handle alternative iso 8601 datetimes

This commit is contained in:
Matthew Jones 2019-01-22 11:44:56 -05:00
parent 91ae343e3b
commit 058e2c0d81
No known key found for this signature in database
GPG Key ID: EED42EEB8B369E1E

View File

@ -167,7 +167,7 @@ class TestSwaggerGeneration():
# replace ISO dates w/ the same value so we don't generate
# needless diffs
data = re.sub(
r'[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]+Z',
r'[0-9]{4}-[0-9]{2}-[0-9]{2}(T|\s)[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]+(Z|\+[0-9]{2}:[0-9]{2})?',
r'2018-02-01T08:00:00.000000Z',
data
)