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
0b9cd9d6
Commit
0b9cd9d6
authored
8 years ago
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test index update with some items to process
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
33f362f1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
weblate/trans/tests/test_commands.py
weblate/trans/tests/test_commands.py
+24
-2
No files found.
weblate/trans/tests/test_commands.py
View file @
0b9cd9d6
...
...
@@ -28,7 +28,7 @@ from django.core.management.base import CommandError
from
django.contrib.auth.models
import
User
from
weblate.trans.tests.test_models
import
RepoTestCase
from
weblate.trans.models
import
SubProject
,
Suggestion
from
weblate.trans.models
import
SubProject
,
Suggestion
,
IndexUpdate
from
weblate.runner
import
main
from
weblate.trans.tests.utils
import
get_test_file
from
weblate.accounts.models
import
Profile
...
...
@@ -286,8 +286,30 @@ class PeriodicCommandTest(RepoTestCase):
Suggestion.objects.count(), 0
)
def test_update_index_empty(self):
call_command(
'
update_index
'
)
def test_update_index(self):
# Test the command
IndexUpdate.objects.create(
unitid=666,
language_code='
fo
',
to_delete=False,
source=False,
)
IndexUpdate.objects.create(
unitid=777,
language_code='
fo
',
to_delete=False,
source=False,
)
IndexUpdate.objects.create(
unitid=888,
language_code='
fo
',
to_delete=False,
source=True,
)
call_command(
'
update_index
'
)
...
...
This diff is collapsed.
Click to expand it.
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