示例#1
0
    def test_to_dict_returns_only_two_fields(self):
        obj = Head(name="Price", displayName="Цена")

        expected = dict(fn="Price", fv="Цена")
        self.assertEqual(obj.to_dict(), expected)
示例#2
0
    def test_to_dict_convertable_to_dict(self):
        obj = Head(name="Price", displayName="Цена")

        expected = dumps(dict(fn="Price", fv="Цена"))
        self.assertEqual(dumps(obj.to_dict()), expected)