def test_put_with_lease(self):
     blob = LocalFileBlob(os.path.join(TEST_FOLDER, "foobar.blob"))
     test_input = (1, 2, 3)
     blob.delete(silent=True)
     blob.put(test_input, lease_period=0.01)
     blob.lease(0.01)
     self.assertEqual(blob.get(), test_input)
 def test_lease_error(self):
     blob = LocalFileBlob(os.path.join(TEST_FOLDER, "foobar.blob"))
     blob.delete(silent=True)
     self.assertEqual(blob.lease(0.01), None)
 def test_put_without_lease(self):
     blob = LocalFileBlob(os.path.join(TEST_FOLDER, "foobar.blob"))
     input = (1, 2, 3)
     blob.delete(silent=True)
     blob.put(input)
     self.assertEqual(blob.get(), input)
 def test_delete(self):
     blob = LocalFileBlob(os.path.join(TEST_FOLDER, "foobar"))
     blob.delete(silent=True)
     self.assertRaises(Exception, blob.delete)
     self.assertRaises(Exception, lambda: blob.delete(silent=False))
Beispiel #5
0
 def test_delete(self):
     blob = LocalFileBlob(os.path.join(TEST_FOLDER, "foobar"))
     blob.delete()
     blob.delete()