aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_digikey.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_digikey.py b/test/test_digikey.py
index 528ed8e..f1b010b 100644
--- a/test/test_digikey.py
+++ b/test/test_digikey.py
@@ -21,7 +21,7 @@ force_refresh = False # Set to True to always fetch the updated html files
def test_digikey_1(tmpdir):
content = client.search("TCR2LF18LM(CTTR-ND")
- res = parser.parse_string(content)
+ res = parser.parse_string(client.baseurl, content)
assert res.response_type == dk.SearchResponseTypes.SINGLE
p = res.products[0]
assert p.part_number == "TCR2LF18LM(CTTR-ND"
@@ -50,7 +50,7 @@ def test_digikey_1(tmpdir):
def test_digikey_2():
content = client.product_search("TCR2LF", page_size=500)
- res = parser.parse_string(content)
+ res = parser.parse_string(client.baseurl, content)
assert res.response_type == dk.SearchResponseTypes.MANY
[print("dpn={}, mpn={}".format(p.part_number, p.mpn)) for p in res.products]
assert len(res.products) > 10
@@ -64,7 +64,7 @@ def test_digikey_2():
content = client.product_search(dpn)
- res = parser.parse_string(content)
+ res = parser.parse_string(client.baseurl, content)
assert res.response_type == dk.SearchResponseTypes.SINGLE
p = res.products[0]
@@ -76,7 +76,7 @@ def test_digikey_2():
def test_digikey_3():
content = client.product_search("RS1MTR")
- res = parser.parse_string(content)
+ res = parser.parse_string(client.baseurl, content)
assert res.response_type == dk.SearchResponseTypes.MANY
[print("dpn={}, mpn={}".format(p.part_number, p.mpn)) for p in res.products]
assert len(res.products) > 0