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
834c7da0
Commit
834c7da0
authored
Aug 22, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test more updates in remote repo
parent
5224a39b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
trans/tests/views.py
trans/tests/views.py
+24
-6
No files found.
trans/tests/views.py
View file @
834c7da0
...
...
@@ -1084,7 +1084,7 @@ class MultiRepoTest(ViewTestCase):
)
self
.
request
=
self
.
get_request
(
'/'
)
def
push_first
(
self
,
propagate
=
True
):
def
push_first
(
self
,
propagate
=
True
,
newtext
=
'Nazdar svete!
\
n
'
):
'''
Changes and pushes first subproject.
'''
...
...
@@ -1094,11 +1094,7 @@ class MultiRepoTest(ViewTestCase):
self
.
subproject2
.
save
()
unit
=
self
.
get_unit
()
self
.
assertEqual
(
self
.
get_translation
().
translated
,
0
)
unit
.
translate
(
self
.
request
,
'Nazdar svete!
\
n
'
,
False
)
unit
.
translate
(
self
.
request
,
[
newtext
],
False
)
self
.
assertEqual
(
self
.
get_translation
().
translated
,
1
)
self
.
subproject
.
do_push
(
self
.
request
)
...
...
@@ -1150,3 +1146,25 @@ class MultiRepoTest(ViewTestCase):
unit
.
translate
(
self
.
request
,
'Ahoj svete!
\
n
'
,
False
)
self
.
assertFalse
(
translation
.
do_update
(
self
.
request
))
def
test_more_changes
(
self
):
'''
Test more string changes in remote repo.
'''
translation
=
self
.
subproject2
.
translation_set
.
get
(
language_code
=
'cs'
)
self
.
push_first
(
False
,
'Hello, world!
\
n
'
)
translation
.
do_update
(
self
.
request
)
translation
=
self
.
subproject2
.
translation_set
.
get
(
language_code
=
'cs'
)
self
.
assertEqual
(
translation
.
failing_checks
,
1
)
self
.
push_first
(
False
,
'Nazdar svete
\
n
'
)
translation
.
do_update
(
self
.
request
)
translation
=
self
.
subproject2
.
translation_set
.
get
(
language_code
=
'cs'
)
self
.
assertEqual
(
translation
.
failing_checks
,
0
)
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