Did I find the right examples for you? yes no

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

src/m/i/Ming-0.4.7/ming/tests/test_declarative.py   Ming(Download)
    def test_field(self):
        doc = self.TestDoc(dict(a=1, b=dict(a=5)))
        self.assertEqual(doc.a, 1)
        self.assertEqual(doc.b, dict(a=5))
        doc.a = 5

src/m/i/Ming-0.4.7/ming/tests/test_functional.py   Ming(Download)
    def test_field(self):
        doc = self.TestDoc(dict(a=1, b=dict(a=5)))
        self.assertEqual(doc.a, 1)
        self.assertEqual(doc.b, dict(a=5))
        doc.a = 5

src/y/a/yadm-0.4/tests/test_fields.py   yadm(Download)
    def test_set_valid(self):
        doc = self.TestDoc()
        doc.string = 'zzz'
        self.assertEqual(doc.string, 'zzz')
 
    def test_set_invalid(self):
        doc = self.TestDoc()
    def test_setattr_objectid(self):
        _id = ObjectId()
        td = self.TestDoc()
        td._id = _id
 
    def test_setattr_str(self):
        _id = ObjectId()
        td = self.TestDoc()
        td._id = str(_id)
 

src/y/a/yadm-0.4/tests/test_documents.py   yadm(Download)
    def test__db(self):
        td = self.TestDoc()
        self.assertIs(td.__db__, None)
 
    def test_fields(self):
    def test_fields_changed(self):
        td = self.TestDoc()
 
        self.assertNotIn('i', td.__fields_changed__)
        self.assertNotIn('b', td.__fields_changed__)