예제 #1
0
def test_get_new_listings_filtered_by_area():
    results = get_new_listings(username,
                               password,
                               property_types=['RESI'],
                               areas=['500'])
    areas = [r['AR'] for r in results]
    assert len(areas)
    assert all(['500 - East Side/South' in a for a in areas])
예제 #2
0
def test_get_new_listings_filtered_by_city():
    results = get_new_listings(username,
                               password,
                               property_types=['RESI'],
                               cities=['Seattle'])
    cities = [r['CIT'] for r in results]
    assert len(cities)
    assert all([c == 'Seattle' for c in cities])
예제 #3
0
def test_get_new_sold_listings():
    results = get_new_listings(username, password, property_types=['RESI'])
    for r in results:
        if r['ST'].upper() == 'SOLD':
            assert 'SP' in r
예제 #4
0
def test_get_new_listings_unfiltered():
    results = get_new_listings(username, password)
    assert len([r for r in results])
예제 #5
0
def test_get_new_listings_filtered_by_area():
    results = get_new_listings(username, password, property_types=['RESI'], areas=['500'])
    areas = [r['AR'] for r in results]
    assert len(areas)
    assert all(['500 - East Side/South' in a for a in areas])
예제 #6
0
def test_get_new_listings_filtered_by_city():
    results = get_new_listings(username, password, property_types=['RESI'], cities=['Seattle'])
    cities = [r['CIT'] for r in results]
    assert len(cities)
    assert all([c == 'Seattle' for c in cities])
예제 #7
0
def test_get_new_listings_unfiltered():
    results = get_new_listings(username, password)
    assert len([r for r in results])
예제 #8
0
def test_get_new_sold_listings():
    results = get_new_listings(username, password, property_types=['RESI'])
    for r in results:
        if r['ST'].upper() == 'SOLD':
            assert 'SP' in r
예제 #9
0
def test_get_new_listings_filtered_by_city():
    results = get_new_listings(username, password, property_types=["RESI"], cities=["Seattle"])
    cities = [r["CIT"] for r in results]
    assert len(cities)
    assert all([c == "Seattle" for c in cities])
예제 #10
0
def test_get_new_listings_filtered_by_area():
    results = get_new_listings(username, password, property_types=["RESI"], areas=["500"])
    areas = [r["AR"] for r in results]
    assert len(areas)
    assert all(["500 - East Side/South" in a for a in areas])
예제 #11
0
def test_get_new_sold_listings():
    results = get_new_listings(username, password, property_types=["RESI"])
    for r in results:
        if r["ST"].upper() == "SOLD":
            assert "SP" in r