fix test cases for Django >= 3.0

This commit is contained in:
Dhaval Mehta 2020-06-28 01:20:18 +05:30
parent d443da68d8
commit 9d2a6c8034

View File

@ -854,12 +854,7 @@ class TestOperationIntrospection(TestCase):
assert properties['url']['type'] == 'string' assert properties['url']['type'] == 'string'
assert properties['url']['nullable'] is True assert properties['url']['nullable'] is True
assert properties['url']['default'] == 'http://www.example.com' assert properties['url']['default'] == 'http://www.example.com'
assert properties['url']['pattern'] == r"^(?:[a-z0-9\.\-\+]*)://(?:[^\s:@/]+(?::[^\s:@/]*)?@)?(?:(?:25[0-5]" \ assert '\\Z' not in properties['url']['pattern']
r"|2[0-4]\d|[0-1]?\d?\d)(?:\.(?:25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}|" \
r"\[[0-9a-f:\.]+\]|([a-z¡-￿0-9](?:[a-z¡-￿0-9-]{0,61}[a-z¡-￿0-9])?" \
r"(?:\.(?!-)[a-z¡-￿0-9-]{1,63}(?<!-))*\.(?!-)(?:[a-z¡-￿-]{2,63}|" \
r"xn--[a-z0-9]{1,59})(?<!-)\.?|localhost))(?::\d{2,5})?(?:[/?#][^\s]*)" \
r"?\z"
assert properties['uuid']['type'] == 'string' assert properties['uuid']['type'] == 'string'
assert properties['uuid']['format'] == 'uuid' assert properties['uuid']['format'] == 'uuid'