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
ef61a319
Commit
ef61a319
authored
Oct 08, 2015
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clear cache before testing google backend
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
775d260d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
weblate/trans/tests/test_machine.py
weblate/trans/tests/test_machine.py
+3
-0
No files found.
weblate/trans/tests/test_machine.py
View file @
ef61a319
...
...
@@ -20,6 +20,7 @@
import
httpretty
from
django.test
import
TestCase
from
django.core.cache
import
cache
from
weblate.trans.tests.test_views
import
ViewTestCase
from
weblate.trans.models.unit
import
Unit
from
weblate.trans.machine.dummy
import
DummyTranslation
...
...
@@ -188,6 +189,7 @@ class MachineTranslationTest(TestCase):
@
httpretty
.
activate
def
test_google
(
self
):
cache
.
delete
(
'%s-languages'
%
GoogleTranslation
().
mtid
)
httpretty
.
register_uri
(
httpretty
.
GET
,
'https://www.googleapis.com/language/translate/v2/languages'
,
...
...
@@ -204,6 +206,7 @@ class MachineTranslationTest(TestCase):
@
httpretty
.
activate
def
test_google_invalid
(
self
):
"""Test handling of server failure."""
cache
.
delete
(
'%s-languages'
%
GoogleTranslation
().
mtid
)
httpretty
.
register_uri
(
httpretty
.
GET
,
'https://www.googleapis.com/language/translate/v2/languages'
,
...
...
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