Commit 12336f92 authored by Michal Čihař's avatar Michal Čihař

Fix test to work with Python 3 exception names

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent d3760f08
......@@ -33,14 +33,14 @@ class LoadClassTest(TestCase):
def test_invalid_name(self):
self.assertRaisesRegexp(
ImproperlyConfigured,
'Error importing class unittest in TEST: "need more than',
'Error importing class unittest in TEST: .*"(not enough|need more than)',
load_class, 'unittest', 'TEST'
)
def test_invalid_module(self):
self.assertRaisesRegexp(
ImproperlyConfigured,
'weblate.trans.tests.missing in TEST: "No module named missing"',
'weblate.trans.tests.missing in TEST: "No module named .*missing["\']',
load_class, 'weblate.trans.tests.missing.Foo', 'TEST'
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment