def test_delete_instance__ok(meta: MetadataRepository, created_instance): image, environment = created_instance.image_id, created_instance.environment_id assert meta.get_instances(image, environment) == [created_instance] meta.delete_instance(created_instance) assert meta.get_instances(image, environment) == []
def test_delete_instance__not_existing(meta: MetadataRepository, instance): with pytest.raises(NonExistingInstanceError): meta.delete_instance(instance)