additional fix
This commit is contained in:
parent
45a7520fc3
commit
6bc4e602bb
@ -1,10 +1,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import pytest
|
|
||||||
|
|
||||||
from builtins import str
|
from builtins import str
|
||||||
|
|
||||||
from mongoengine import *
|
import pytest
|
||||||
|
|
||||||
|
from mongoengine import *
|
||||||
from tests.utils import MongoDBTestCase
|
from tests.utils import MongoDBTestCase
|
||||||
|
|
||||||
|
|
||||||
@ -37,8 +36,9 @@ class TestURLField(MongoDBTestCase):
|
|||||||
with pytest.raises(ValidationError) as exc_info:
|
with pytest.raises(ValidationError) as exc_info:
|
||||||
link.validate()
|
link.validate()
|
||||||
assert (
|
assert (
|
||||||
str(exc_info.exception)
|
str(exc_info.value)
|
||||||
== u"ValidationError (Link:None) (Invalid URL: http://\u043f\u0440\u0438\u0432\u0435\u0442.com: ['url'])")
|
== u"ValidationError (Link:None) (Invalid URL: http://\u043f\u0440\u0438\u0432\u0435\u0442.com: ['url'])"
|
||||||
|
)
|
||||||
|
|
||||||
def test_url_scheme_validation(self):
|
def test_url_scheme_validation(self):
|
||||||
"""Ensure that URLFields validate urls with specific schemes properly.
|
"""Ensure that URLFields validate urls with specific schemes properly.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user