@pytest.fixture(autouse=True)
def never_use_single_delete(monkeypatch):
 def die():
  assert False
 monkeypatch.setattr(storage.Blob, 'delete', die)
 monkeypatch.setattr(storage.Bucket, 'delete_blob', die)

@ pytest . fixture ( autouse = True ) def never_use_single_delete ( monkeypatch ) : def die ( ) : assert False monkeypatch . setattr ( storage . Blob , 'delete' , die ) monkeypatch . setattr ( storage . Bucket , 'delete_blob' , die )
detect any mistaken uses of single-blob deletion .