def test_dotted_key(self): class Foo: bar = 52 store = sqla_yaml_fixtures.Store() store.put('foo', Foo) assert store.get('foo.bar.__class__.__name__') == 'int'
def test_get_non_existent(self): store = sqla_yaml_fixtures.Store() assert pytest.raises(KeyError, store.get, 'foo')
def test_duplicate_key_raises(self): store = sqla_yaml_fixtures.Store() store.put('foo', 'bar') assert pytest.raises(AssertionError, store.put, 'foo', 'second')
def test_put_get(self): store = sqla_yaml_fixtures.Store() store.put('foo', 'bar') assert store.get('foo') == 'bar'