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_get_instances__full(meta: MetadataRepository, created_image, created_environment, created_instance): assert meta.get_instances(created_image, created_environment) == [created_instance]
def test_get_instances__empty(meta: MetadataRepository, created_image, created_environment): assert meta.get_instances(created_image, created_environment) == []