-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a stubbed test for find_best_prices
- Loading branch information
Showing
2 changed files
with
12 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
def hello() -> str: | ||
return "Hello from pricescoutai!" | ||
|
||
def find_best_prices(query: str): | ||
""" | ||
Placeholder function that will eventually return the best prices for the given query. | ||
""" | ||
return {"error": "Functionality not implemented yet"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,7 @@ | ||
from pricescoutai import ProductParser | ||
from pricescoutai import find_best_prices | ||
|
||
def test_example(): | ||
assert False, "This is a failing test to get started!" | ||
|
||
def test_parse_description(): | ||
description = "Nylon Braided 3-in-1 Multi-Charging Cable" | ||
expected = { | ||
'type': '3-in-1 Multi-Charging Cable', | ||
'features': ['Nylon Braided', 'USB Power Mode', '≤36V Operating Voltage'], | ||
'compatible_devices': ['iPhone', 'Android'] | ||
} | ||
parser = ProductParser(description) | ||
result = parser.parse_description() | ||
|
||
assert result == expected | ||
def test_find_best_prices(): | ||
query = "candy bars" | ||
result = find_best_prices(query) | ||
assert isinstance(result, dict), "Result should be a dictionary" | ||
assert "error" in result, "Result should indicate that functionality is not implemented yet" |