Skip to content

Commit e6ef50c

Browse files
committed
test: stop patch for category after test
1 parent 158dae8 commit e6ef50c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/test_client.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,13 @@ def test_get_article_with_category(self):
163163
)
164164

165165
category_patch = patch(
166-
"python_picnic_api2.client.PicnicAPI.get_category_by_ids").start()
167-
category_patch.return_value = {
166+
"python_picnic_api2.client.PicnicAPI.get_category_by_ids")
167+
category_patch.start().return_value = {
168168
"l2_id": 2000, "l3_id": 3000, "name": "Test"}
169169

170170
article = self.client.get_article("p3f2qa", True)
171+
172+
category_patch.stop()
171173
self.session_mock().get.assert_called_with(
172174
"https://storefront-prod.nl.picnicinternational.com/api/15/pages/product-details-page-root?id=p3f2qa&show_category_action=true",
173175
headers=PICNIC_HEADERS,

0 commit comments

Comments
 (0)