diff --git a/system_tests/bigquery.py b/system_tests/bigquery.py
index <HASH>..<HASH> 100644
--- a/system_tests/bigquery.py
+++ b/system_tests/bigquery.py
@@ -263,7 +263,6 @@ class TestBigQuery(unittest2.TestCase):
         self.to_delete.append(bucket)
 
         blob = bucket.blob(BLOB_NAME)
-        self.to_delete.insert(0, blob)
 
         with tempfile.TemporaryFile(mode='w+') as csv_file:
             writer = csv.writer(csv_file)
@@ -272,6 +271,8 @@ class TestBigQuery(unittest2.TestCase):
             blob.upload_from_file(
                 csv_file, rewind=True, content_type='text/csv')
 
+        self.to_delete.insert(0, blob)
+
         dataset = CLIENT.dataset(DATASET_NAME)
         dataset.create()
         self.to_delete.append(dataset)
Defer adding CSV blob to 'to_delete' until after upload succeeds.

Avoids blowing up the cleanup code, stranding the bucket.