Remove DictField.basecls related code, it is useless

This commit is contained in:
Bastien Gérard
2018-09-04 20:51:06 +02:00
parent 032ace40d1
commit a25d127f36
2 changed files with 2 additions and 34 deletions

View File

@@ -3618,33 +3618,6 @@ class QuerySetTest(unittest.TestCase):
Group.drop_collection()
def test_dict_with_custom_baseclass(self):
"""Ensure DictField working with custom base clases.
"""
class Test(Document):
testdict = DictField()
Test.drop_collection()
t = Test(testdict={'f': 'Value'})
t.save()
self.assertEqual(
Test.objects(testdict__f__startswith='Val').count(), 1)
self.assertEqual(Test.objects(testdict__f='Value').count(), 1)
Test.drop_collection()
class Test(Document):
testdict = DictField(basecls=StringField)
t = Test(testdict={'f': 'Value'})
t.save()
self.assertEqual(Test.objects(testdict__f='Value').count(), 1)
self.assertEqual(
Test.objects(testdict__f__startswith='Val').count(), 1)
Test.drop_collection()
def test_bulk(self):
"""Ensure bulk querying by object id returns a proper dict.
"""