Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
f8978f7e
Commit
f8978f7e
authored
Feb 15, 2016
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Silence Python 3 deprecation warnings
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
553fb910
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
weblate/trans/tests/test_utils.py
weblate/trans/tests/test_utils.py
+5
-3
No files found.
weblate/trans/tests/test_utils.py
View file @
f8978f7e
...
@@ -22,6 +22,8 @@ from unittest import TestCase
...
@@ -22,6 +22,8 @@ from unittest import TestCase
from
django.core.exceptions
import
ImproperlyConfigured
from
django.core.exceptions
import
ImproperlyConfigured
from
six
import
assertRaisesRegex
from
weblate.trans.util
import
load_class
from
weblate.trans.util
import
load_class
...
@@ -31,7 +33,7 @@ class LoadClassTest(TestCase):
...
@@ -31,7 +33,7 @@ class LoadClassTest(TestCase):
self
.
assertEqual
(
cls
,
TestCase
)
self
.
assertEqual
(
cls
,
TestCase
)
def
test_invalid_name
(
self
):
def
test_invalid_name
(
self
):
self
.
assertRaisesRegexp
(
assertRaisesRegex
(
ImproperlyConfigured
,
ImproperlyConfigured
,
'Error importing class unittest in TEST: .*"'
'Error importing class unittest in TEST: .*"'
'(not enough|need more than)'
,
'(not enough|need more than)'
,
...
@@ -39,7 +41,7 @@ class LoadClassTest(TestCase):
...
@@ -39,7 +41,7 @@ class LoadClassTest(TestCase):
)
)
def
test_invalid_module
(
self
):
def
test_invalid_module
(
self
):
self
.
assertRaisesRegexp
(
assertRaisesRegex
(
ImproperlyConfigured
,
ImproperlyConfigured
,
'weblate.trans.tests.missing in TEST: "'
'weblate.trans.tests.missing in TEST: "'
'No module named .*missing["
\
'
]'
,
'No module named .*missing["
\
'
]'
,
...
@@ -47,7 +49,7 @@ class LoadClassTest(TestCase):
...
@@ -47,7 +49,7 @@ class LoadClassTest(TestCase):
)
)
def
test_invalid_class
(
self
):
def
test_invalid_class
(
self
):
self
.
assertRaisesRegexp
(
assertRaisesRegex
(
ImproperlyConfigured
,
ImproperlyConfigured
,
'"weblate.trans.tests.test_utils" does not define a "Foo" class'
,
'"weblate.trans.tests.test_utils" does not define a "Foo" class'
,
load_class
,
'weblate.trans.tests.test_utils.Foo'
,
'TEST'
load_class
,
'weblate.trans.tests.test_utils.Foo'
,
'TEST'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment