diff --git a/asset/cloud-client/quickstart_exportassets_test.py b/asset/cloud-client/quickstart_exportassets_test.py index 35036c7b8a1..4e08e007aed 100644 --- a/asset/cloud-client/quickstart_exportassets_test.py +++ b/asset/cloud-client/quickstart_exportassets_test.py @@ -33,16 +33,16 @@ def storage_client(): @pytest.fixture(scope='module') def asset_bucket(storage_client): - storage_client.create_bucket(BUCKET) + bucket = storage_client.create_bucket(BUCKET) + + yield BUCKET try: - storage_client.delete_bucket(BUCKET) + bucket.delete(force=True) except Exception as e: print('Failed to delete bucket{}'.format(BUCKET)) raise e - yield BUCKET - def test_export_assets(asset_bucket, capsys): dump_file_path = 'gs://{}/assets-dump.txt'.format(asset_bucket)