-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix s3 delete_many #38
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,6 +107,14 @@ def test_get_upload_info_max_content_length(self, app, client): | |
def assert_app_config_content_length_range(self, conditions): | ||
assert get_condition(conditions, 'content-length-range') == [0, 100] | ||
|
||
def test_delete_many_empty_list(self, annex, monkeypatch): | ||
def assert_not_called(*args, **kwargs): | ||
assert(False) | ||
|
||
monkeypatch.setattr(annex._client, 'delete_objects', assert_not_called) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not just use a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because I didn't think it was worth adding a dependency There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what dependency? isn't mock in python3? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes but tests run also on py2 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think adding that dev dep is fine/better There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mkay |
||
|
||
annex.delete_many(tuple()) | ||
|
||
|
||
class TestS3AnnexFromEnv(TestS3Annex): | ||
@pytest.fixture | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably worth noting that you're doing this first because
keys
may be an iterable