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

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@disruptek
Contributor

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
boto/mws/connection.py
}
content_md5 = lambda c: base64.encodestring(hashlib.md5(c).digest()).strip()
decorated_attrs = ('action', 'response', 'section',
'quota', 'restore', 'version')
+api_call_map = {}
@toastdriven
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
disruptek Apr 4, 2013 Contributor

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

@toastdriven
Contributor

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.

@disruptek
Contributor

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.

@disruptek
Contributor

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
Merged

MWS Iter fix #1804

@toastdriven
Contributor

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