fix broken mws.iter_call() and mws.iter_response() #1374

wants to merge 1 commit into


None yet

2 participants


My ugly hack broke (as it was bound to) due to auth changes elsewhere. This fixes the convenience methods; generators that yield responses as appropriate when an arbitrary call result is paginated.

@toastdriven toastdriven commented on the diff Apr 3, 2013
content_md5 = lambda c: base64.encodestring(hashlib.md5(c).digest()).strip()
decorated_attrs = ('action', 'response', 'section',
'quota', 'restore', 'version')
+api_call_map = {}
toastdriven Apr 3, 2013 Contributor

I'm not in love with this being module-level (think very long-lived processes caching this indefinitely), but I don't know if there's a better place to be putting it.

disruptek Apr 4, 2013 Contributor

Actually, that's why I put it there. If you come up with a better idea, I'll listen...


I'd feel a ton better about this change if there were some tests backing it. Since it looks like most of this can be faked, just adding a couple simple unit (non-integration) tests for the wrapper & method_for functions would be perfect. I like it much better than the previous solution.


If a couple simple unit tests for these methods make you feel a ton better, I encourage you to submit a pull request. :-)

I feel a ton better about replacing code that doesn't work at all and isn't covered by tests with code that works fine and isn't covered by tests.


How are the tests coming?

@toastdriven toastdriven was assigned Oct 17, 2013
@toastdriven toastdriven added a commit to toastdriven/boto that referenced this pull request Oct 21, 2013
@toastdriven toastdriven Added tests for the changes to MWS in #1374. 9e51f32
@toastdriven toastdriven referenced this pull request Oct 21, 2013

MWS Iter fix #1804


Merged. Thanks for the patch!

@toastdriven toastdriven removed their assignment Mar 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment