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
dd92225b
Commit
dd92225b
authored
Nov 29, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test TS file editing (issue #424)
parent
ba5875d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
trans/tests/test_models.py
trans/tests/test_models.py
+5
-5
trans/tests/test_views.py
trans/tests/test_views.py
+5
-0
No files found.
trans/tests/test_models.py
View file @
dd92225b
...
@@ -147,10 +147,10 @@ class RepoTestCase(TestCase):
...
@@ -147,10 +147,10 @@ class RepoTestCase(TestCase):
'po-mono/en.po'
,
'po-mono/en.po'
,
)
)
def
create_ts
(
self
):
def
create_ts
(
self
,
suffix
=
''
):
return
self
.
_create_subproject
(
return
self
.
_create_subproject
(
'ts'
,
'ts'
,
'ts
/*.ts'
,
'ts
{0}/*.ts'
.
format
(
suffix
)
,
)
)
def
create_iphone
(
self
):
def
create_iphone
(
self
):
...
@@ -355,8 +355,8 @@ class SubProjectTest(RepoTestCase):
...
@@ -355,8 +355,8 @@ class SubProjectTest(RepoTestCase):
self
.
verify_subproject
(
project
,
1
,
'cs'
,
4
)
self
.
verify_subproject
(
project
,
1
,
'cs'
,
4
)
def
test_create_ts
(
self
):
def
test_create_ts
(
self
):
project
=
self
.
create_ts
()
project
=
self
.
create_ts
(
'-translated'
)
self
.
verify_subproject
(
project
,
1
,
'cs'
,
4
,
'Hello, world!'
)
self
.
verify_subproject
(
project
,
1
,
'cs'
,
4
)
unit
=
Unit
.
objects
.
get
(
source__startswith
=
'Orangutan'
)
unit
=
Unit
.
objects
.
get
(
source__startswith
=
'Orangutan'
)
self
.
assertTrue
(
unit
.
is_plural
())
self
.
assertTrue
(
unit
.
is_plural
())
...
@@ -367,7 +367,7 @@ class SubProjectTest(RepoTestCase):
...
@@ -367,7 +367,7 @@ class SubProjectTest(RepoTestCase):
self
.
assertFalse
(
unit
.
is_plural
())
self
.
assertFalse
(
unit
.
is_plural
())
self
.
assertTrue
(
unit
.
translated
)
self
.
assertTrue
(
unit
.
translated
)
self
.
assertFalse
(
unit
.
fuzzy
)
self
.
assertFalse
(
unit
.
fuzzy
)
self
.
assertEqual
(
unit
.
target
,
'Hello, world!'
)
self
.
assertEqual
(
unit
.
target
,
'Hello, world!
\
n
'
)
unit
=
Unit
.
objects
.
get
(
source__startswith
=
'Thank '
)
unit
=
Unit
.
objects
.
get
(
source__startswith
=
'Thank '
)
self
.
assertFalse
(
unit
.
is_plural
())
self
.
assertFalse
(
unit
.
is_plural
())
...
...
trans/tests/test_views.py
View file @
dd92225b
...
@@ -642,6 +642,11 @@ class EditLinkTest(EditTest):
...
@@ -642,6 +642,11 @@ class EditLinkTest(EditTest):
return
self
.
create_link
()
return
self
.
create_link
()
class
EditTSTest
(
EditTest
):
def
create_subproject
(
self
):
return
self
.
create_ts
()
class
SuggestionsTest
(
ViewTestCase
):
class
SuggestionsTest
(
ViewTestCase
):
def
add_suggestion_1
(
self
):
def
add_suggestion_1
(
self
):
return
self
.
edit_unit
(
return
self
.
edit_unit
(
...
...
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