Added a few more tests

This commit is contained in:
Raphael Michel
2015-08-28 18:16:11 +02:00
parent 6fa6b46348
commit 4bd8945432
4 changed files with 58 additions and 3 deletions

View File

@@ -44,7 +44,7 @@ class Versionable(BaseVersionable):
if self.version_end_date: # NOQA
raise ValueError('This is a historical item and can not be cloned.')
if forced_version_date:
if forced_version_date: # NOQA
if not self.version_start_date <= forced_version_date <= get_utc_now():
raise ValueError('The clone date must be between the version start date and now.')
else: