Skip to content

[bug] OSS - wrong sequence of unit tests #16

Description

@Magnus-COWI

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

deftest_upload_object_buff(self):
buff=bytes('This is a test...', 'utf-8')
obj=self.client.upload_object(FORGE_BUCKET, 'unittest.txt', buff)
assertobjdeftest_upload_object_file(self):
withopen(__file__, 'rb') asfile:
obj=self.client.upload_object(FORGE_BUCKET, 'unittest.py', file)
assertobjdeftest_get_object_details(self): #NOTE: called before test_upload_object_buff()details=self.client.get_object_details(FORGE_BUCKET, 'unittest.txt')
assert'objectKey'indetails

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions