def test_load_json(self): from bokeh.plotobject import PlotObject cls = PlotObject.get_class("Plot") obj = cls.load_json({'id': 'test_id', 'min_border': 100}) self.assertEqual(obj._id, 'test_id') self.assertEqual(obj.title, '') self.assertEqual(obj.min_border, 100) obj.load_json({'id': 'test_id', 'title': 'xyz'}, instance=obj) self.assertEqual(obj._id, 'test_id') self.assertEqual(obj.title, 'xyz') self.assertEqual(obj.min_border, 100)
def test_load_json(self): from bokeh.plotobject import PlotObject cls = PlotObject.get_class("Plot") obj = cls.load_json({"id": "test_id", "min_border": 100}) self.assertEqual(obj._id, "test_id") self.assertEqual(obj.title, "") self.assertEqual(obj.min_border, 100) obj.load_json({"id": "test_id", "title": "xyz"}, instance=obj) self.assertEqual(obj._id, "test_id") self.assertEqual(obj.title, "xyz") self.assertEqual(obj.min_border, 100)