def test__set_subdocuments(self):
        self.skipTest(
            "MongoClient does not allow setting subdocuments on existing non-documents")
        self.cmp.do.insert(
            {'name': 'bob', 'data1': 1, 'subdocument': {'a': {'b': {'c': 20}}}})
        self.cmp.do.update({'name': 'bob'}, {'$set': {'data1.field1': 11}})
        self.cmp.compare.find()
        self.cmp.do.update({'name': 'bob'}, {'$set': {'data2.field1': 21}})
        self.cmp.compare.find()
        self.cmp.do.update({'name': 'bob'}, {'$set': {'subdocument.a.b': 21}})
        self.cmp.compare.find()
Tests using $set for setting subdocument fields
dataset/ETHPy150Open vmalloc/mongomock/tests/test__mongomock.py/MongoClientCollectionTest.test__set_subdocuments