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
bf86322a
Commit
bf86322a
authored
Dec 13, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial test for checks
parent
19147d06
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
16 deletions
+27
-16
weblate/trans/tests.py
weblate/trans/tests.py
+0
-16
weblate/trans/tests/__init__.py
weblate/trans/tests/__init__.py
+1
-0
weblate/trans/tests/test_checks.py
weblate/trans/tests/test_checks.py
+26
-0
No files found.
weblate/trans/tests.py
deleted
100644 → 0
View file @
19147d06
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from
django.test
import
TestCase
class
SimpleTest
(
TestCase
):
def
test_basic_addition
(
self
):
"""
Tests that 1 + 1 always equals 2.
"""
self
.
assertEqual
(
1
+
1
,
2
)
weblate/trans/tests/__init__.py
0 → 100644
View file @
bf86322a
from
test_checks
import
*
weblate/trans/tests/test_checks.py
0 → 100644
View file @
bf86322a
"""
Tests for consistency checks.
"""
from
django.test
import
TestCase
from
weblate.trans.checks
import
SameCheck
class
Language
(
object
):
'''
Mock language object.
'''
def
__init__
(
self
,
code
):
self
.
code
=
code
class
CheckTest
(
TestCase
):
def
test_same
(
self
):
check
=
SameCheck
()
self
.
assertFalse
(
check
.
check_single
(
'source'
,
'translation'
,
''
,
Language
(
'cs'
),
None
))
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