Skip to content

Commit

Permalink
refactor(query)
Browse files Browse the repository at this point in the history
  • Loading branch information
h2non committed Jan 14, 2017
1 parent 55b32af commit bf95274
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pook/matchers/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ def test(key, param):
if match is None:
return False

# Normalize param value
param = [param] if not isinstance(param, list) else param

# Compare query params
for index, value in enumerate(param):
# Perform query param comparison
[self.compare(value, expect) for expect in match]
[[self.compare(value, expect)
for expect in match] for value in param]

return True

Expand Down

0 comments on commit bf95274

Please sign in to comment.