-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
test_get_object_details() fails for me because it is called before test_upload_object_buff(). Therefor no unittest.txt file exists in the bucket.
This happens because the sequence of methods are alphabetical.
An improvement might be to add a testSuite. But I have no experience using it.
https://stackoverflow.com/a/36430378
def test_upload_object_buff(self):
buff = bytes('This is a test...', 'utf-8')
obj = self.client.upload_object(FORGE_BUCKET, 'unittest.txt', buff)
assert obj
def test_upload_object_file(self):
with open(__file__, 'rb') as file:
obj = self.client.upload_object(FORGE_BUCKET, 'unittest.py', file)
assert obj
def test_get_object_details(self): #NOTE: called before test_upload_object_buff()
details = self.client.get_object_details(FORGE_BUCKET, 'unittest.txt')
assert 'objectKey' in detailsMetadata
Metadata
Assignees
Labels
No labels