mirror of
https://github.com/Bunsly/HomeHarvest.git
synced 2026-03-05 12:04:31 -08:00
- cullen merge
This commit is contained in:
@@ -10,7 +10,6 @@ from homeharvest.exceptions import (
|
||||
def test_realtor_comps():
|
||||
result = scrape_property(
|
||||
location="2530 Al Lipscomb Way",
|
||||
site_name="realtor.com",
|
||||
radius=0.5,
|
||||
)
|
||||
|
||||
@@ -19,11 +18,11 @@ def test_realtor_comps():
|
||||
|
||||
def test_realtor_last_x_days_sold():
|
||||
days_result_30 = scrape_property(
|
||||
location="Dallas, TX", site_name="realtor.com", listing_type="sold", sold_last_x_days=30
|
||||
location="Dallas, TX", listing_type="sold", sold_last_x_days=30
|
||||
)
|
||||
|
||||
days_result_10 = scrape_property(
|
||||
location="Dallas, TX", site_name="realtor.com", listing_type="sold", sold_last_x_days=10
|
||||
location="Dallas, TX", listing_type="sold", sold_last_x_days=10
|
||||
)
|
||||
|
||||
assert all([result is not None for result in [days_result_30, days_result_10]]) and len(days_result_30) != len(days_result_10)
|
||||
@@ -33,16 +32,15 @@ def test_realtor():
|
||||
results = [
|
||||
scrape_property(
|
||||
location="2530 Al Lipscomb Way",
|
||||
site_name="realtor.com",
|
||||
listing_type="for_sale",
|
||||
),
|
||||
scrape_property(
|
||||
location="Phoenix, AZ", site_name=["realtor.com"], listing_type="for_rent"
|
||||
location="Phoenix, AZ", listing_type="for_rent"
|
||||
), #: does not support "city, state, USA" format
|
||||
scrape_property(
|
||||
location="Dallas, TX", site_name="realtor.com", listing_type="sold"
|
||||
location="Dallas, TX", listing_type="sold"
|
||||
), #: does not support "city, state, USA" format
|
||||
scrape_property(location="85281", site_name="realtor.com"),
|
||||
scrape_property(location="85281"),
|
||||
]
|
||||
|
||||
assert all([result is not None for result in results])
|
||||
@@ -52,7 +50,6 @@ def test_realtor():
|
||||
bad_results += [
|
||||
scrape_property(
|
||||
location="abceefg ju098ot498hh9",
|
||||
site_name="realtor.com",
|
||||
listing_type="for_sale",
|
||||
)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user