summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polyconseil.fr>2012-05-22 17:54:31 +0200
committerRaphaël Barrois <raphael.barrois@polyconseil.fr>2012-05-22 17:56:21 +0200
commit070c1edcea1c50f3dec279192ab76082370bea42 (patch)
tree4e6e8998d20347dcb7aea74974b36a3bf122bf07 /tests
parent906a44a211e96eaba32324f45647d01a566a0f09 (diff)
downloadsemantic-version-070c1edcea1c50f3dec279192ab76082370bea42.tar.gz
Properly validate values.
Signed-off-by: Raphaël Barrois <raphael.barrois@polyconseil.fr>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_django.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_django.py b/tests/test_django.py
index 52d419c..3185dc3 100644
--- a/tests/test_django.py
+++ b/tests/test_django.py
@@ -54,6 +54,8 @@ class DjangoFieldTestCase(unittest.TestCase):
self.assertEqual(obj.spec, alt_obj.spec)
self.assertEqual(obj.version, alt_obj.version)
+ obj.full_clean()
+
def test_invalid_input(self):
self.assertRaises(ValueError, models.VersionModel,
version='0.1.1', spec='blah')
@@ -81,6 +83,8 @@ class DjangoFieldTestCase(unittest.TestCase):
self.assertIsNone(obj.optional)
self.assertIsNone(obj.optional_spec)
+ obj.full_clean()
+
def test_serialization(self):
o1 = models.VersionModel(version='0.1.1', spec='==0.1.1,!=0.1.1-alpha')
o2 = models.VersionModel(version='0.4.3-rc3+build3',