- invalid test cases

- redfin and realtor bug fixes
- dupe check bug fix
This commit is contained in:
Zachary Hampton
2023-09-18 20:28:03 -07:00
parent e1917009ae
commit 3ec47c5b6a
7 changed files with 64 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
from homeharvest import scrape_property
from homeharvest.exceptions import InvalidSite, InvalidListingType, NoResultsFound, GeoCoordsNotFound
def test_realtor():
@@ -18,3 +19,17 @@ def test_realtor():
]
assert all([result is not None for result in results])
bad_results = []
try:
bad_results += [
scrape_property(
location="abceefg ju098ot498hh9",
site_name="realtor.com",
listing_type="for_sale",
)
]
except (InvalidSite, InvalidListingType, NoResultsFound, GeoCoordsNotFound):
assert True
assert all([result is None for result in bad_results])