auroradns: Implement iterator for zones and records#829
auroradns: Implement iterator for zones and records#829wido wants to merge 1 commit intoapache:trunkfrom
Conversation
|
thanks @wido it would be great to update the test case to validate that the responses are infact tuples or iterate the responses. the current case I think just checks the first response. |
By implementing iterate_zones() and iterate_records() you can iterate over zones and records returned by the API. The list_zones() and list_records() methods simply talk to the iteration functions and create a list of it and return that. The test cases should still match since they call the list functions and those call the iterators on their turn. The test case test_list_zones() however has been expanded to iterate over the result. The test_list_records case already iterated over the results, so that verifies that the result is iteratable.
91988e1 to
d0f5c34
Compare
|
@tonybaloney Thanks for the feedback! I expanded one test-case slightly, but the records were already iterated. Or I might be missing your point here. But the list_records/zones calls call the iterate functions, so that tests it from beginning to end, right? |
|
cool, 👍 then. you need to make sure you make multiple assertions for a generator method, that was all I was suggesting. |
|
Thanks for this change. I know I am a bit late, but anyway. I removed the |
By implementing iterate_zones() and iterate_records() you can
iterate over zones and records returned by the API.
The list_zones() and list_records() methods simply talk to the
iteration functions and create a list of it and return that.
The test cases should still match since they call the list functions
and those call the iterators on their turn.