def test_None_to_json(self): filename = self.temp_text() write_json(filename, None) actual = read_json(filename) self.assertIsNone(actual)
def test_write_file(self): filename = self.temp_text() obj = Klass("value", 345) write_json(filename, obj) actual = read_json(filename) self.assertEquals("value", actual.member1) self.assertEquals(345, actual.member2)
def save(self, items): convertible.write_json(self.filename, items)
def save(self, obj): self.logger.info('saving config={0}'.format(self.filename)) convertible.write_json(self.filename, obj)