Esempio n. 1
0
    def test_data_key(self):
        # data is used internally, so we need to explictly test it
        obj = DictObject(data=1)
        self.assertEqual(obj, {'data': 1})

        obj.data = 2
        self.assertEqual(obj, {'data': 2})

        obj.update(dict(data=3))
        self.assertEqual(obj, {'data': 3})
Esempio n. 2
0
 def test_update(self):
     obj = DictObject(foo=1)
     obj.update(dict(bar=2))
     self.assertEqual(obj, {'foo': 1, 'bar': 2})