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
e421bc91
Commit
e421bc91
authored
Feb 02, 2016
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for offloaded index update on unit deletion
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
0b9cd9d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
weblate/trans/tests/test_models.py
weblate/trans/tests/test_models.py
+19
-1
No files found.
weblate/trans/tests/test_models.py
View file @
e421bc91
...
...
@@ -36,6 +36,7 @@ from django.core.exceptions import ValidationError
from
weblate.trans.models
import
(
Project
,
SubProject
,
Source
,
Unit
,
WhiteboardMessage
,
Check
,
Suggestion
,
IndexUpdate
,
get_related_units
,
)
from
weblate
import
appsettings
...
...
@@ -446,6 +447,24 @@ class SubProjectTest(RepoTestCase):
self
.
assertTrue
(
os
.
path
.
exists
(
project
.
get_path
()))
project
.
delete
()
self
.
assertFalse
(
os
.
path
.
exists
(
project
.
get_path
()))
self
.
assertEqual
(
0
,
SubProject
.
objects
.
count
())
@
OverrideSettings
(
OFFLOAD_INDEXING
=
False
)
def
test_delete_no_offload
(
self
):
project
=
self
.
create_subproject
()
project
.
delete
()
self
.
assertEqual
(
0
,
IndexUpdate
.
objects
.
count
())
@
OverrideSettings
(
OFFLOAD_INDEXING
=
True
)
def
test_delete_offload
(
self
):
project
=
self
.
create_subproject
()
project
.
delete
()
self
.
assertEqual
(
12
,
IndexUpdate
.
objects
.
count
()
)
self
.
assertEqual
(
12
,
IndexUpdate
.
objects
.
filter
(
to_delete
=
True
).
count
()
)
def
test_delete_link
(
self
):
project
=
self
.
create_link
()
...
...
@@ -857,7 +876,6 @@ class SubProjectTest(RepoTestCase):
# Check suggestion has been copied
self
.
assertEqual
(
subproject
.
project
.
suggestion_set
.
count
(),
1
)
class
TranslationTest
(
RepoTestCase
):
"""
Translation testing.
...
...
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