mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-28 00:49:49 +03:00
fix test cases for Django >= 3.0
This commit is contained in:
parent
d443da68d8
commit
9d2a6c8034
|
@ -854,12 +854,7 @@ class TestOperationIntrospection(TestCase):
|
|||
assert properties['url']['type'] == 'string'
|
||||
assert properties['url']['nullable'] is True
|
||||
assert properties['url']['default'] == 'http://www.example.com'
|
||||
assert properties['url']['pattern'] == r"^(?:[a-z0-9\.\-\+]*)://(?:[^\s:@/]+(?::[^\s:@/]*)?@)?(?:(?:25[0-5]" \
|
||||
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 '\\Z' not in properties['url']['pattern']
|
||||
|
||||
assert properties['uuid']['type'] == 'string'
|
||||
assert properties['uuid']['format'] == 'uuid'
|
||||
|
|
Loading…
Reference in New Issue
Block a user