[enh]: make last_x_days generic

add mls_only
make radius generic
This commit is contained in:
Cullen Watson
2023-10-04 10:11:53 -05:00
parent 51bde20c3c
commit c4870677c2
9 changed files with 220 additions and 201 deletions

View File

@@ -9,10 +9,10 @@ from homeharvest.exceptions import (
def test_realtor_comps():
result = scrape_property(
location="2530 Al Lipscomb Way",
radius=0.5,
sold_last_x_days=180,
listing_type="sold",
location="2530 Al Lipscomb Way",
radius=0.5,
sold_last_x_days=180,
listing_type="sold",
)
assert result is not None and len(result) > 0
@@ -27,7 +27,9 @@ def test_realtor_last_x_days_sold():
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)
assert all(
[result is not None for result in [days_result_30, days_result_10]]
) and len(days_result_30) != len(days_result_10)
def test_realtor_single_property():
@@ -39,7 +41,7 @@ def test_realtor_single_property():
scrape_property(
location="2530 Al Lipscomb Way",
listing_type="for_sale",
)
),
]
assert all([result is not None for result in results])