Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rex Dri
Rex Dri
Commits
dbf4e75c
Commit
dbf4e75c
authored
Aug 28, 2018
by
Florent Chehab
Browse files
Versionning Test Corrected
parent
fbe13e6e
Changes
2
Hide whitespace changes
Inline
Side-by-side
backend/signals.py
View file @
dbf4e75c
...
...
@@ -6,8 +6,6 @@ new_revision_saved = django.dispatch.Signal(providing_args=["obj"])
def
squashRevisionByUser
(
sender
,
obj
,
**
kwargs
):
"""
TODO add comment and unit test
It should also work with moderation as obj will be a versionned object
"""
versions
=
Version
.
objects
\
...
...
backend/tests/test_versionning.py
View file @
dbf4e75c
...
...
@@ -3,6 +3,7 @@ from backend.models.my_model import ForTestingVersionning
from
django.conf
import
settings
from
reversion.models
import
Version
from
backend.signals
import
new_revision_saved
from
django.test
import
override_settings
class
VersionningTestCase
(
WithUserTestCase
):
...
...
@@ -38,7 +39,7 @@ class VersionningTestCase(WithUserTestCase):
return
matching
[
0
]
####
@
override_settings
(
MODERATION_ACTIVATED
=
False
)
def
test_versionning
(
self
):
"""
Test to check that versionning is working
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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