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
f232a780
Commit
f232a780
authored
Jul 15, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not use deprecated assertion name
parent
f5cccdae
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
53 additions
and
53 deletions
+53
-53
accounts/tests.py
accounts/tests.py
+1
-1
trans/tests/admin.py
trans/tests/admin.py
+1
-1
trans/tests/autofix.py
trans/tests/autofix.py
+16
-16
trans/tests/check_views.py
trans/tests/check_views.py
+3
-3
trans/tests/dictionary.py
trans/tests/dictionary.py
+8
-8
trans/tests/files.py
trans/tests/files.py
+20
-20
trans/tests/js_views.py
trans/tests/js_views.py
+2
-2
trans/tests/machine.py
trans/tests/machine.py
+2
-2
No files found.
accounts/tests.py
View file @
f232a780
...
@@ -161,7 +161,7 @@ class CommandTest(TestCase):
...
@@ -161,7 +161,7 @@ class CommandTest(TestCase):
user
.
save
()
user
.
save
()
call_command
(
'importusers'
,
get_test_file
(
'users.json'
))
call_command
(
'importusers'
,
get_test_file
(
'users.json'
))
user2
=
User
.
objects
.
get
(
username
=
'weblate'
)
user2
=
User
.
objects
.
get
(
username
=
'weblate'
)
self
.
assertEqual
s
(
user
.
first_name
,
user2
.
first_name
)
self
.
assertEqual
(
user
.
first_name
,
user2
.
first_name
)
class
ViewTest
(
TestCase
):
class
ViewTest
(
TestCase
):
...
...
trans/tests/admin.py
View file @
f232a780
...
@@ -58,4 +58,4 @@ class SSHKeysTest(TestCase):
...
@@ -58,4 +58,4 @@ class SSHKeysTest(TestCase):
def
test_parse
(
self
):
def
test_parse
(
self
):
trans
.
admin_views
.
KNOWN_HOSTS_FILE
=
TEST_HOSTS
trans
.
admin_views
.
KNOWN_HOSTS_FILE
=
TEST_HOSTS
hosts
=
trans
.
admin_views
.
get_host_keys
()
hosts
=
trans
.
admin_views
.
get_host_keys
()
self
.
assertEqual
s
(
len
(
hosts
),
50
)
self
.
assertEqual
(
len
(
hosts
),
50
)
trans/tests/autofix.py
View file @
f232a780
...
@@ -35,11 +35,11 @@ class AutoFixTest(TestCase):
...
@@ -35,11 +35,11 @@ class AutoFixTest(TestCase):
def
test_ellipsis
(
self
):
def
test_ellipsis
(
self
):
unit
=
Unit
(
source
=
u'Foo…'
)
unit
=
Unit
(
source
=
u'Foo…'
)
fix
=
ReplaceTrailingDotsWithEllipsis
()
fix
=
ReplaceTrailingDotsWithEllipsis
()
self
.
assertEqual
s
(
self
.
assertEqual
(
fix
.
fix_target
([
'Bar...'
],
unit
),
fix
.
fix_target
([
'Bar...'
],
unit
),
([
u'Bar…'
],
True
)
([
u'Bar…'
],
True
)
)
)
self
.
assertEqual
s
(
self
.
assertEqual
(
fix
.
fix_target
([
'Bar... '
],
unit
),
fix
.
fix_target
([
'Bar... '
],
unit
),
([
u'Bar... '
],
False
)
([
u'Bar... '
],
False
)
)
)
...
@@ -47,11 +47,11 @@ class AutoFixTest(TestCase):
...
@@ -47,11 +47,11 @@ class AutoFixTest(TestCase):
def
test_no_ellipsis
(
self
):
def
test_no_ellipsis
(
self
):
unit
=
Unit
(
source
=
u'Foo...'
)
unit
=
Unit
(
source
=
u'Foo...'
)
fix
=
ReplaceTrailingDotsWithEllipsis
()
fix
=
ReplaceTrailingDotsWithEllipsis
()
self
.
assertEqual
s
(
self
.
assertEqual
(
fix
.
fix_target
([
'Bar...'
],
unit
),
fix
.
fix_target
([
'Bar...'
],
unit
),
([
u'Bar...'
],
False
)
([
u'Bar...'
],
False
)
)
)
self
.
assertEqual
s
(
self
.
assertEqual
(
fix
.
fix_target
([
u'Bar…'
],
unit
),
fix
.
fix_target
([
u'Bar…'
],
unit
),
([
u'Bar…'
],
False
)
([
u'Bar…'
],
False
)
)
)
...
@@ -59,16 +59,16 @@ class AutoFixTest(TestCase):
...
@@ -59,16 +59,16 @@ class AutoFixTest(TestCase):
def
test_whitespace
(
self
):
def
test_whitespace
(
self
):
unit
=
Unit
(
source
=
u'Foo
\
n
'
)
unit
=
Unit
(
source
=
u'Foo
\
n
'
)
fix
=
SameBookendingWhitespace
()
fix
=
SameBookendingWhitespace
()
self
.
assertEqual
s
(
self
.
assertEqual
(
fix
.
fix_target
([
'Bar'
],
unit
),
fix
.
fix_target
([
'Bar'
],
unit
),
([
u'Bar
\
n
'
],
True
)
([
u'Bar
\
n
'
],
True
)
)
)
self
.
assertEqual
s
(
self
.
assertEqual
(
fix
.
fix_target
([
'Bar
\
n
'
],
unit
),
fix
.
fix_target
([
'Bar
\
n
'
],
unit
),
([
u'Bar
\
n
'
],
False
)
([
u'Bar
\
n
'
],
False
)
)
)
unit
=
Unit
(
source
=
u' '
)
unit
=
Unit
(
source
=
u' '
)
self
.
assertEqual
s
(
self
.
assertEqual
(
fix
.
fix_target
([
' '
],
unit
),
fix
.
fix_target
([
' '
],
unit
),
([
' '
],
False
)
([
' '
],
False
)
)
)
...
@@ -76,11 +76,11 @@ class AutoFixTest(TestCase):
...
@@ -76,11 +76,11 @@ class AutoFixTest(TestCase):
def
test_no_whitespace
(
self
):
def
test_no_whitespace
(
self
):
unit
=
Unit
(
source
=
u'Foo'
)
unit
=
Unit
(
source
=
u'Foo'
)
fix
=
SameBookendingWhitespace
()
fix
=
SameBookendingWhitespace
()
self
.
assertEqual
s
(
self
.
assertEqual
(
fix
.
fix_target
([
'Bar'
],
unit
),
fix
.
fix_target
([
'Bar'
],
unit
),
([
u'Bar'
],
False
)
([
u'Bar'
],
False
)
)
)
self
.
assertEqual
s
(
self
.
assertEqual
(
fix
.
fix_target
([
'Bar
\
n
'
],
unit
),
fix
.
fix_target
([
'Bar
\
n
'
],
unit
),
([
u'Bar'
],
True
)
([
u'Bar'
],
True
)
)
)
...
@@ -88,11 +88,11 @@ class AutoFixTest(TestCase):
...
@@ -88,11 +88,11 @@ class AutoFixTest(TestCase):
def
test_zerospace
(
self
):
def
test_zerospace
(
self
):
unit
=
Unit
(
source
=
u'Foo
\
u200b
'
)
unit
=
Unit
(
source
=
u'Foo
\
u200b
'
)
fix
=
RemoveZeroSpace
()
fix
=
RemoveZeroSpace
()
self
.
assertEqual
s
(
self
.
assertEqual
(
fix
.
fix_target
([
'Bar'
],
unit
),
fix
.
fix_target
([
'Bar'
],
unit
),
([
u'Bar'
],
False
)
([
u'Bar'
],
False
)
)
)
self
.
assertEqual
s
(
self
.
assertEqual
(
fix
.
fix_target
([
u'Bar
\
u200b
'
],
unit
),
fix
.
fix_target
([
u'Bar
\
u200b
'
],
unit
),
([
u'Bar
\
u200b
'
],
False
)
([
u'Bar
\
u200b
'
],
False
)
)
)
...
@@ -100,11 +100,11 @@ class AutoFixTest(TestCase):
...
@@ -100,11 +100,11 @@ class AutoFixTest(TestCase):
def
test_no_zerospace
(
self
):
def
test_no_zerospace
(
self
):
unit
=
Unit
(
source
=
u'Foo'
)
unit
=
Unit
(
source
=
u'Foo'
)
fix
=
RemoveZeroSpace
()
fix
=
RemoveZeroSpace
()
self
.
assertEqual
s
(
self
.
assertEqual
(
fix
.
fix_target
([
'Bar'
],
unit
),
fix
.
fix_target
([
'Bar'
],
unit
),
([
u'Bar'
],
False
)
([
u'Bar'
],
False
)
)
)
self
.
assertEqual
s
(
self
.
assertEqual
(
fix
.
fix_target
([
u'Bar
\
u200b
'
],
unit
),
fix
.
fix_target
([
u'Bar
\
u200b
'
],
unit
),
([
u'Bar'
],
True
)
([
u'Bar'
],
True
)
)
)
...
@@ -112,6 +112,6 @@ class AutoFixTest(TestCase):
...
@@ -112,6 +112,6 @@ class AutoFixTest(TestCase):
def
test_fix_target
(
self
):
def
test_fix_target
(
self
):
unit
=
Unit
(
source
=
u'Foo…'
)
unit
=
Unit
(
source
=
u'Foo…'
)
fixed
,
fixups
=
fix_target
([
'Bar...'
],
unit
)
fixed
,
fixups
=
fix_target
([
'Bar...'
],
unit
)
self
.
assertEqual
s
(
fixed
,
[
u'Bar…'
])
self
.
assertEqual
(
fixed
,
[
u'Bar…'
])
self
.
assertEqual
s
(
len
(
fixups
),
1
)
self
.
assertEqual
(
len
(
fixups
),
1
)
self
.
assertEqual
s
(
unicode
(
fixups
[
0
]),
u'Trailing ellipsis'
)
self
.
assertEqual
(
unicode
(
fixups
[
0
]),
u'Trailing ellipsis'
)
trans/tests/check_views.py
View file @
f232a780
...
@@ -47,7 +47,7 @@ class ChecksViewTest(ViewTestCase):
...
@@ -47,7 +47,7 @@ class ChecksViewTest(ViewTestCase):
response
=
self
.
client
.
get
(
response
=
self
.
client
.
get
(
reverse
(
'show_check'
,
kwargs
=
{
'name'
:
'not-existing'
})
reverse
(
'show_check'
,
kwargs
=
{
'name'
:
'not-existing'
})
)
)
self
.
assertEqual
s
(
response
.
status_code
,
404
)
self
.
assertEqual
(
response
.
status_code
,
404
)
response
=
self
.
client
.
get
(
response
=
self
.
client
.
get
(
reverse
(
reverse
(
...
@@ -71,7 +71,7 @@ class ChecksViewTest(ViewTestCase):
...
@@ -71,7 +71,7 @@ class ChecksViewTest(ViewTestCase):
kwargs
=
{
'name'
:
'non-existing'
,
'project'
:
self
.
project
.
slug
}
kwargs
=
{
'name'
:
'non-existing'
,
'project'
:
self
.
project
.
slug
}
)
)
)
)
self
.
assertEqual
s
(
response
.
status_code
,
404
)
self
.
assertEqual
(
response
.
status_code
,
404
)
response
=
self
.
client
.
get
(
response
=
self
.
client
.
get
(
reverse
(
reverse
(
...
@@ -107,4 +107,4 @@ class ChecksViewTest(ViewTestCase):
...
@@ -107,4 +107,4 @@ class ChecksViewTest(ViewTestCase):
}
}
)
)
)
)
self
.
assertEqual
s
(
response
.
status_code
,
404
)
self
.
assertEqual
(
response
.
status_code
,
404
)
trans/tests/dictionary.py
View file @
f232a780
...
@@ -66,7 +66,7 @@ class DictionaryTest(ViewTestCase):
...
@@ -66,7 +66,7 @@ class DictionaryTest(ViewTestCase):
self
.
assertRedirects
(
response
,
show_url
)
self
.
assertRedirects
(
response
,
show_url
)
# Check number of imported objects
# Check number of imported objects
self
.
assertEqual
s
(
Dictionary
.
objects
.
count
(),
164
)
self
.
assertEqual
(
Dictionary
.
objects
.
count
(),
164
)
# Check they are shown
# Check they are shown
response
=
self
.
client
.
get
(
show_url
)
response
=
self
.
client
.
get
(
show_url
)
...
@@ -81,7 +81,7 @@ class DictionaryTest(ViewTestCase):
...
@@ -81,7 +81,7 @@ class DictionaryTest(ViewTestCase):
response
=
self
.
import_file
(
TEST_TBX
,
method
=
'overwrite'
)
response
=
self
.
import_file
(
TEST_TBX
,
method
=
'overwrite'
)
# Check number of imported objects
# Check number of imported objects
self
.
assertEqual
s
(
Dictionary
.
objects
.
count
(),
164
)
self
.
assertEqual
(
Dictionary
.
objects
.
count
(),
164
)
# Check entry got overwritten
# Check entry got overwritten
response
=
self
.
client
.
get
(
show_url
)
response
=
self
.
client
.
get
(
show_url
)
...
@@ -96,7 +96,7 @@ class DictionaryTest(ViewTestCase):
...
@@ -96,7 +96,7 @@ class DictionaryTest(ViewTestCase):
response
=
self
.
import_file
(
TEST_TBX
,
method
=
'add'
)
response
=
self
.
import_file
(
TEST_TBX
,
method
=
'add'
)
# Check number of imported objects
# Check number of imported objects
self
.
assertEqual
s
(
Dictionary
.
objects
.
count
(),
165
)
self
.
assertEqual
(
Dictionary
.
objects
.
count
(),
165
)
def
test_import_csv
(
self
):
def
test_import_csv
(
self
):
# Import file
# Import file
...
@@ -106,7 +106,7 @@ class DictionaryTest(ViewTestCase):
...
@@ -106,7 +106,7 @@ class DictionaryTest(ViewTestCase):
self
.
assertRedirects
(
response
,
self
.
get_url
(
'show_dictionary'
))
self
.
assertRedirects
(
response
,
self
.
get_url
(
'show_dictionary'
))
# Check number of imported objects
# Check number of imported objects
self
.
assertEqual
s
(
Dictionary
.
objects
.
count
(),
164
)
self
.
assertEqual
(
Dictionary
.
objects
.
count
(),
164
)
def
test_import_csv_header
(
self
):
def
test_import_csv_header
(
self
):
# Import file
# Import file
...
@@ -116,7 +116,7 @@ class DictionaryTest(ViewTestCase):
...
@@ -116,7 +116,7 @@ class DictionaryTest(ViewTestCase):
self
.
assertRedirects
(
response
,
self
.
get_url
(
'show_dictionary'
))
self
.
assertRedirects
(
response
,
self
.
get_url
(
'show_dictionary'
))
# Check number of imported objects
# Check number of imported objects
self
.
assertEqual
s
(
Dictionary
.
objects
.
count
(),
164
)
self
.
assertEqual
(
Dictionary
.
objects
.
count
(),
164
)
def
test_import_po
(
self
):
def
test_import_po
(
self
):
# Import file
# Import file
...
@@ -126,7 +126,7 @@ class DictionaryTest(ViewTestCase):
...
@@ -126,7 +126,7 @@ class DictionaryTest(ViewTestCase):
self
.
assertRedirects
(
response
,
self
.
get_url
(
'show_dictionary'
))
self
.
assertRedirects
(
response
,
self
.
get_url
(
'show_dictionary'
))
# Check number of imported objects
# Check number of imported objects
self
.
assertEqual
s
(
Dictionary
.
objects
.
count
(),
164
)
self
.
assertEqual
(
Dictionary
.
objects
.
count
(),
164
)
def
test_edit
(
self
):
def
test_edit
(
self
):
'''
'''
...
@@ -146,7 +146,7 @@ class DictionaryTest(ViewTestCase):
...
@@ -146,7 +146,7 @@ class DictionaryTest(ViewTestCase):
self
.
assertRedirects
(
response
,
show_url
)
self
.
assertRedirects
(
response
,
show_url
)
# Check number of objects
# Check number of objects
self
.
assertEqual
s
(
Dictionary
.
objects
.
count
(),
1
)
self
.
assertEqual
(
Dictionary
.
objects
.
count
(),
1
)
dict_id
=
Dictionary
.
objects
.
all
()[
0
].
id
dict_id
=
Dictionary
.
objects
.
all
()[
0
].
id
dict_id_url
=
'?id=%d'
%
dict_id
dict_id_url
=
'?id=%d'
%
dict_id
...
@@ -175,7 +175,7 @@ class DictionaryTest(ViewTestCase):
...
@@ -175,7 +175,7 @@ class DictionaryTest(ViewTestCase):
self
.
assertRedirects
(
response
,
show_url
)
self
.
assertRedirects
(
response
,
show_url
)
# Check number of objects
# Check number of objects
self
.
assertEqual
s
(
Dictionary
.
objects
.
count
(),
0
)
self
.
assertEqual
(
Dictionary
.
objects
.
count
(),
0
)
def
test_download_csv
(
self
):
def
test_download_csv
(
self
):
'''
'''
...
...
trans/tests/files.py
View file @
f232a780
...
@@ -69,13 +69,13 @@ class ImportTest(ViewTestCase):
...
@@ -69,13 +69,13 @@ class ImportTest(ViewTestCase):
# Verify stats
# Verify stats
translation
=
self
.
get_translation
()
translation
=
self
.
get_translation
()
self
.
assertEqual
s
(
translation
.
translated
,
1
)
self
.
assertEqual
(
translation
.
translated
,
1
)
self
.
assertEqual
s
(
translation
.
fuzzy
,
0
)
self
.
assertEqual
(
translation
.
fuzzy
,
0
)
self
.
assertEqual
s
(
translation
.
total
,
4
)
self
.
assertEqual
(
translation
.
total
,
4
)
# Verify unit
# Verify unit
unit
=
self
.
get_unit
()
unit
=
self
.
get_unit
()
self
.
assertEqual
s
(
unit
.
target
,
TRANSLATION_PO
)
self
.
assertEqual
(
unit
.
target
,
TRANSLATION_PO
)
def
test_import_author
(
self
):
def
test_import_author
(
self
):
'''
'''
...
@@ -89,13 +89,13 @@ class ImportTest(ViewTestCase):
...
@@ -89,13 +89,13 @@ class ImportTest(ViewTestCase):
# Verify stats
# Verify stats
translation
=
self
.
get_translation
()
translation
=
self
.
get_translation
()
self
.
assertEqual
s
(
translation
.
translated
,
1
)
self
.
assertEqual
(
translation
.
translated
,
1
)
self
.
assertEqual
s
(
translation
.
fuzzy
,
0
)
self
.
assertEqual
(
translation
.
fuzzy
,
0
)
self
.
assertEqual
s
(
translation
.
total
,
4
)
self
.
assertEqual
(
translation
.
total
,
4
)
# Verify unit
# Verify unit
unit
=
self
.
get_unit
()
unit
=
self
.
get_unit
()
self
.
assertEqual
s
(
unit
.
target
,
TRANSLATION_PO
)
self
.
assertEqual
(
unit
.
target
,
TRANSLATION_PO
)
def
test_import_overwrite
(
self
):
def
test_import_overwrite
(
self
):
'''
'''
...
@@ -109,7 +109,7 @@ class ImportTest(ViewTestCase):
...
@@ -109,7 +109,7 @@ class ImportTest(ViewTestCase):
# Verify unit
# Verify unit
unit
=
self
.
get_unit
()
unit
=
self
.
get_unit
()
self
.
assertEqual
s
(
unit
.
target
,
TRANSLATION_PO
)
self
.
assertEqual
(
unit
.
target
,
TRANSLATION_PO
)
def
test_import_no_overwrite
(
self
):
def
test_import_no_overwrite
(
self
):
'''
'''
...
@@ -123,7 +123,7 @@ class ImportTest(ViewTestCase):
...
@@ -123,7 +123,7 @@ class ImportTest(ViewTestCase):
# Verify unit
# Verify unit
unit
=
self
.
get_unit
()
unit
=
self
.
get_unit
()
self
.
assertEqual
s
(
unit
.
target
,
TRANSLATION_OURS
)
self
.
assertEqual
(
unit
.
target
,
TRANSLATION_OURS
)
def
test_import_fuzzy
(
self
):
def
test_import_fuzzy
(
self
):
'''
'''
...
@@ -134,14 +134,14 @@ class ImportTest(ViewTestCase):
...
@@ -134,14 +134,14 @@ class ImportTest(ViewTestCase):
# Verify unit
# Verify unit
unit
=
self
.
get_unit
()
unit
=
self
.
get_unit
()
self
.
assertEqual
s
(
unit
.
target
,
TRANSLATION_PO
)
self
.
assertEqual
(
unit
.
target
,
TRANSLATION_PO
)
self
.
assertEqual
s
(
unit
.
fuzzy
,
True
)
self
.
assertEqual
(
unit
.
fuzzy
,
True
)
# Verify stats
# Verify stats
translation
=
self
.
get_translation
()
translation
=
self
.
get_translation
()
self
.
assertEqual
s
(
translation
.
translated
,
0
)
self
.
assertEqual
(
translation
.
translated
,
0
)
self
.
assertEqual
s
(
translation
.
fuzzy
,
1
)
self
.
assertEqual
(
translation
.
fuzzy
,
1
)
self
.
assertEqual
s
(
translation
.
total
,
4
)
self
.
assertEqual
(
translation
.
total
,
4
)
def
test_import_suggest
(
self
):
def
test_import_suggest
(
self
):
'''
'''
...
@@ -152,14 +152,14 @@ class ImportTest(ViewTestCase):
...
@@ -152,14 +152,14 @@ class ImportTest(ViewTestCase):
# Verify unit
# Verify unit
unit
=
self
.
get_unit
()
unit
=
self
.
get_unit
()
self
.
assertEqual
s
(
unit
.
translated
,
False
)
self
.
assertEqual
(
unit
.
translated
,
False
)
# Verify stats
# Verify stats
translation
=
self
.
get_translation
()
translation
=
self
.
get_translation
()
self
.
assertEqual
s
(
translation
.
translated
,
0
)
self
.
assertEqual
(
translation
.
translated
,
0
)
self
.
assertEqual
s
(
translation
.
fuzzy
,
0
)
self
.
assertEqual
(
translation
.
fuzzy
,
0
)
self
.
assertEqual
s
(
translation
.
total
,
4
)
self
.
assertEqual
(
translation
.
total
,
4
)
self
.
assertEqual
s
(
self
.
assertEqual
(
translation
.
have_suggestion
,
translation
.
have_suggestion
,
1
1
)
)
...
...
trans/tests/js_views.py
View file @
f232a780
...
@@ -38,13 +38,13 @@ class JSViewsTest(ViewTestCase):
...
@@ -38,13 +38,13 @@ class JSViewsTest(ViewTestCase):
reverse
(
'js-get'
,
kwargs
=
{
'checksum'
:
unit
.
checksum
}),
reverse
(
'js-get'
,
kwargs
=
{
'checksum'
:
unit
.
checksum
}),
)
)
self
.
assertContains
(
response
,
'Hello'
)
self
.
assertContains
(
response
,
'Hello'
)
self
.
assertEqual
s
(
response
.
content
,
unit
.
get_source_plurals
()[
0
])
self
.
assertEqual
(
response
.
content
,
unit
.
get_source_plurals
()[
0
])
response
=
self
.
client
.
get
(
response
=
self
.
client
.
get
(
reverse
(
'js-get'
,
kwargs
=
{
'checksum'
:
'x'
}),
reverse
(
'js-get'
,
kwargs
=
{
'checksum'
:
'x'
}),
)
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
s
(
response
.
content
,
''
)
self
.
assertEqual
(
response
.
content
,
''
)
def
test_translate
(
self
):
def
test_translate
(
self
):
unit
=
self
.
get_unit
()
unit
=
self
.
get_unit
()
...
...
trans/tests/machine.py
View file @
f232a780
...
@@ -109,7 +109,7 @@ class WeblateTranslationTest(ViewTestCase):
...
@@ -109,7 +109,7 @@ class WeblateTranslationTest(ViewTestCase):
unit
,
unit
,
self
.
user
self
.
user
)
)
self
.
assertEqual
s
(
results
,
[])
self
.
assertEqual
(
results
,
[])
def
test_similar
(
self
):
def
test_similar
(
self
):
machine
=
WeblateSimilarTranslation
()
machine
=
WeblateSimilarTranslation
()
...
@@ -120,4 +120,4 @@ class WeblateTranslationTest(ViewTestCase):
...
@@ -120,4 +120,4 @@ class WeblateTranslationTest(ViewTestCase):
unit
,
unit
,
self
.
user
self
.
user
)
)
self
.
assertEqual
s
(
results
,
[])
self
.
assertEqual
(
results
,
[])
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