Skip to content

Commit eba51c5

Browse files
committed
Add test for get_article
1 parent 09c1620 commit eba51c5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/test_client.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ def json(self):
2323
return self.json_data
2424

2525
def setUp(self) -> None:
26-
self.session_patcher = patch("python_picnic_api2.client.PicnicAPISession")
26+
self.session_patcher = patch(
27+
"python_picnic_api2.client.PicnicAPISession")
2728
self.session_mock = self.session_patcher.start()
2829
self.client = PicnicAPI(username="test@test.nl", password="test")
2930
self.expected_base_url = DEFAULT_URL.format("nl", "15")
@@ -106,6 +107,13 @@ def test_search_encoding(self):
106107
headers=PICNIC_HEADERS,
107108
)
108109

110+
def test_get_article(self):
111+
self.client.get_article("p3f2qa")
112+
self.session_mock().get.assert_called_with(
113+
"https://storefront-prod.nl.picnicinternational.com/api/15/pages/product-details-page-root?id=p3f2qa",
114+
headers=PICNIC_HEADERS,
115+
)
116+
109117
def test_get_article_by_gtin(self):
110118
self.client.get_article_by_gtin("123456789")
111119
self.session_mock().get.assert_called_with(

0 commit comments

Comments
 (0)