From 6bc4e602bb5fef6c48ccc3233645eed729f2d9a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastien=20G=C3=A9rard?= Date: Sat, 14 Dec 2019 00:05:48 +0100 Subject: [PATCH] additional fix --- tests/fields/test_url_field.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/fields/test_url_field.py b/tests/fields/test_url_field.py index 98f5d4fd..477bced7 100644 --- a/tests/fields/test_url_field.py +++ b/tests/fields/test_url_field.py @@ -1,10 +1,9 @@ # -*- coding: utf-8 -*- -import pytest - from builtins import str -from mongoengine import * +import pytest +from mongoengine import * from tests.utils import MongoDBTestCase @@ -37,8 +36,9 @@ class TestURLField(MongoDBTestCase): with pytest.raises(ValidationError) as exc_info: link.validate() assert ( - str(exc_info.exception) - == u"ValidationError (Link:None) (Invalid URL: http://\u043f\u0440\u0438\u0432\u0435\u0442.com: ['url'])") + str(exc_info.value) + == u"ValidationError (Link:None) (Invalid URL: http://\u043f\u0440\u0438\u0432\u0435\u0442.com: ['url'])" + ) def test_url_scheme_validation(self): """Ensure that URLFields validate urls with specific schemes properly.