def test_deser(self): class C(ComplexModel): a = Unicode b = Decimal ret = get_object_as_yaml(C(a='burak', b=D(30)), C) assert ret == b"""C:
def test_deser(self): class C(ComplexModel): a = Unicode b = Decimal ret = get_object_as_yaml(C(a='burak', b=D(30)), C) assert ret == """C:
def do_write_config(self): open(self.config_file, 'wb').write(get_object_as_yaml(self, self.__class__, polymorphic=True))
def write_config(self): open(self.config_file, 'wb').write( get_object_as_yaml(self, self.__class__, polymorphic=True))