Skip to content

Commit

Permalink
Use chain.from_iterable in mocking.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cool-RR committed Jun 17, 2020
1 parent f8af888 commit 76f7833
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions alchemy_mock/mocking.py
Expand Up @@ -434,13 +434,8 @@ def _get_data(self, *args, **kwargs):
if _mock_name == "get":
query_call = [c for c in previous_calls if c[0] == "query"][0]
results = list(
chain(
*[
result
for calls, result in sorted_mock_data
if query_call in calls
]
)
chain.from_iterable(result for calls, result in sorted_mock_data
if query_call in calls)
)
return self.boundary[_mock_name](results, *args, **kwargs)

Expand Down

0 comments on commit 76f7833

Please sign in to comment.