parent
420c6f2d1e
commit
d1d30a9280
@ -4,6 +4,7 @@ Changelog
|
|||||||
|
|
||||||
Changes in 0.6.14
|
Changes in 0.6.14
|
||||||
=================
|
=================
|
||||||
|
- Fixed Int/Float fields and not equals None
|
||||||
- Exclude tests from installation
|
- Exclude tests from installation
|
||||||
- Allow tuples for index meta
|
- Allow tuples for index meta
|
||||||
- Fixed use of str in instance checks
|
- Fixed use of str in instance checks
|
||||||
|
@ -127,6 +127,19 @@ class FieldTest(unittest.TestCase):
|
|||||||
|
|
||||||
self.assertRaises(ValidationError, ret.validate)
|
self.assertRaises(ValidationError, ret.validate)
|
||||||
|
|
||||||
|
def test_int_and_float_ne_operator(self):
|
||||||
|
class TestDocument(Document):
|
||||||
|
int_fld = IntField()
|
||||||
|
float_fld = FloatField()
|
||||||
|
|
||||||
|
TestDocument.drop_collection()
|
||||||
|
|
||||||
|
TestDocument(int_fld=None, float_fld=None).save()
|
||||||
|
TestDocument(int_fld=1, float_fld=1).save()
|
||||||
|
|
||||||
|
self.assertEqual(1, TestDocument.objects(int_fld__ne=None).count())
|
||||||
|
self.assertEqual(1, TestDocument.objects(float_fld__ne=None).count())
|
||||||
|
|
||||||
def test_object_id_validation(self):
|
def test_object_id_validation(self):
|
||||||
"""Ensure that invalid values cannot be assigned to string fields.
|
"""Ensure that invalid values cannot be assigned to string fields.
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user