Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A gabbi test for multiple member_of<N> was using the `query_parameters` keyword to construct the querystring; but it was trying to test what happens when member_of<N> is specified multiple times. In this test, N was the same for both, but the query parameters were being entered as separate dict keys; so the querystring was only being constructed with the latter value, because yaml [1]. The test was passing spuriously because it happens to be the case that the result would be the same if only the latter value is specified. (If you reversed the order of the two member_ofZ, the test failed.) This change re-YAMLs the query_parameters to use list syntax for the values of the member_of key, from which gabbi will dtrt in constructing the querystring. NB: It might be nice to find a test scenario where the false positive wouldn't have been possible; but that would be a bigger effort that could possibly entail reswizzling the GranularFixture and therefore the whole gabbit. Done this way, we're at least sure that both values are making it to the handler; and switching the order in the querystring has no effect (though the order is apparently not guaranteed/deterministic anyway [2]). [1] yaml/pyyaml#165 [2] https://gabbi.readthedocs.io/en/latest/example.html (search for query_parameters) Change-Id: I10f28d8c21643be69b67f25dcc043cd9640eac42
- Loading branch information