tests_for_datastore #63
@@ -16,14 +16,14 @@ class TestDelete(unittest.TestCase):
|
||||
self.bucket_name = 'test-bucket'
|
||||
self.object_name = '46KXJMFIAPVLM0TKRFZR5YPPTVJ6PJNX'
|
||||
# set bad arguments
|
||||
self.bad_minio_client = 'not-minio-type'
|
||||
self.bad_client = 'not-minio-type'
|
||||
self.bad_string = float(0.0)
|
||||
self.len_0_string = ''
|
||||
|
||||
def test_should_fail_on_wrong_input_type_client(self):
|
||||
with self.assertRaises(AssertionError):
|
||||
delete(
|
||||
client=self.bad_minio_client,
|
||||
client=self.bad_client,
|
||||
bucket_name=self.bucket_name,
|
||||
object_name=self.object_name,
|
||||
)
|
||||
|
||||
@@ -15,14 +15,14 @@ class TestGet(unittest.TestCase):
|
||||
self.bucket_name = 'test-bucket'
|
||||
self.object_name = '46KXJMFIAPVLM0TKRFZR5YPPTVJ6PJNX'
|
||||
# set bad arguments
|
||||
self.bad_minio_client = 'not-minio-type'
|
||||
self.bad_client = 'not-minio-type'
|
||||
self.bad_string = float(0.0)
|
||||
self.len_0_string = ''
|
||||
|
||||
def test_should_fail_on_wrong_input_type_client(self):
|
||||
with self.assertRaises(AssertionError):
|
||||
get(
|
||||
client=self.bad_minio_client,
|
||||
client=self.bad_client,
|
||||
bucket_name=self.bucket_name,
|
||||
object_name=self.object_name,
|
||||
)
|
||||
|
||||
@@ -20,7 +20,7 @@ class TestPut(unittest.TestCase):
|
||||
self.buffer = BytesIO()
|
||||
self.image.save(self.buffer, 'png')
|
||||
# set bad arguments
|
||||
self.bad_minio_client = 'not-minio-type'
|
||||
self.bad_client = 'not-minio-type'
|
||||
self.bad_string = float(0.0)
|
||||
self.bad_buffer = 'not-buffer-type'
|
||||
self.len_0_string = ''
|
||||
@@ -28,7 +28,7 @@ class TestPut(unittest.TestCase):
|
||||
def test_should_fail_on_wrong_input_type_client(self):
|
||||
with self.assertRaises(AssertionError):
|
||||
put(
|
||||
client=self.bad_minio_client,
|
||||
client=self.bad_client,
|
||||
buffer=self.buffer,
|
||||
bucket_name=self.bucket_name,
|
||||
object_name=self.object_name,
|
||||
@@ -37,7 +37,7 @@ class TestPut(unittest.TestCase):
|
||||
def test_should_fail_on_wrong_input_type_buffer(self):
|
||||
with self.assertRaises(AssertionError):
|
||||
put(
|
||||
client=self.bad_minio_client,
|
||||
client=self.client,
|
||||
buffer=self.bad_buffer,
|
||||
bucket_name=self.bucket_name,
|
||||
object_name=self.object_name,
|
||||
|
||||
Reference in New Issue
Block a user