def test_to_dict_modifying_the_dict_doesnt_modify_the_schema(): original_schema_dict = { 'foo': 'bar', } schema = Profile(original_schema_dict) schema_dict = schema.to_dict() schema_dict['bar'] = 'baz' assert 'bar' not in schema.to_dict()
def test_to_dict_modifying_the_dict_doesnt_modify_the_schema(): original_schema_dict = { 'foo': 'bar', } schema = Profile(original_schema_dict) schema_dict = schema.to_dict() schema_dict['bar'] = 'baz' assert 'bar' not in schema.to_dict()
def test_init_changing_the_original_schema_dict_doesnt_change_schema(): schema_dict = { 'foo': 'bar' } schema = Profile(schema_dict) schema_dict['bar'] = 'baz' assert 'bar' not in schema.to_dict()
def test_init_loads_schema_from_dict(): schema_dict = { 'foo': 'bar' } schema = Profile(schema_dict) assert schema.to_dict().keys() == schema_dict.keys() assert schema.to_dict()['foo'] == schema_dict['foo']
def test_init_changing_the_original_schema_dict_doesnt_change_schema(): schema_dict = { 'foo': 'bar' } schema = Profile(schema_dict) schema_dict['bar'] = 'baz' assert 'bar' not in schema.to_dict()
def test_init_loads_schema_from_dict(): schema_dict = { 'foo': 'bar' } schema = Profile(schema_dict) assert schema.to_dict().keys() == schema_dict.keys() assert schema.to_dict()['foo'] == schema_dict['foo']
def test_to_dict_converts_schema_to_dict(): original_schema_dict = { 'foo': 'bar', } schema = Profile(original_schema_dict) assert schema.to_dict() == original_schema_dict
def test_to_dict_converts_schema_to_dict(): original_schema_dict = { 'foo': 'bar', } schema = Profile(original_schema_dict) assert schema.to_dict() == original_schema_dict