Fixed #90, putting None inside containers now throws a validation error

This commit is contained in:
Jon Haddad
2013-12-12 15:23:00 -08:00
parent 5c425e8193
commit daa4772e45

View File

@@ -367,6 +367,15 @@ class TestMapColumn(BaseCassEngTestCase):
tmp = TestMapModel.create() tmp = TestMapModel.create()
tmp.int_map['blah'] = 1 tmp.int_map['blah'] = 1
def test_add_none_as_map_key(self):
with self.assertRaises(ValidationError):
TestMapModel.create(int_map={None:1})
def test_add_none_as_map_value(self):
with self.assertRaises(ValidationError):
TestMapModel.create(int_map={None:1})
def test_empty_retrieve(self): def test_empty_retrieve(self):
tmp = TestMapModel.create() tmp = TestMapModel.create()
tmp2 = TestMapModel.get(partition=tmp.partition) tmp2 = TestMapModel.get(partition=tmp.partition)