<reponame>GeorgeSHogg/Lab-Group-79-PartIA-Flood-Warning-System
from floodsystem.geo import rivers_with_station, stations_by_river
from floodsystem.stationdata import build_station_list

def test_rivers_with_stations():
    #Build list of stations
    stations = build_station_list()
    rivers = rivers_with_station(stations)

    rivers = sorted(rivers)
    r = rivers[:10]
#Test for No. of stations with at least one monitoring station
    assert len(rivers) >= 940
# Test for first 10 rivers
    assert r == ['Addlestone Bourne', 'Aire Washlands', 'Alconbury Brook', 'Aldingbourne Rife', 'Aller Brook', 'Allison Dyke', 'Alverthorpe Beck', 'Ampney Brook', 'Amwell Loop', 'Arkle Beck']

def test_stations_by_rivers():
    stations = build_station_list()
    s = stations_by_river(stations, "River Cam")
 #Test for stations on River Cam
    assert s == ['Cam', 'Cambridge', 'Cambridge Baits Bite', 'Cambridge Jesus Lock', 'Dernford', 'Great Chesterford', 'Weston Bampfylde']

test_rivers_with_stations()
test_stations_by_rivers()
from floodsystem.geo import rivers_with_station, stations_by_river
from floodsystem.stationdata import build_station_list

def test_rivers_with_stations():
    #Build list of stations
    stations = build_station_list()
    rivers = rivers_with_station(stations)

    rivers = sorted(rivers)
    r = rivers[:10]
#Test for No. of stations with at least one monitoring station
    assert len(rivers) >= 940
# Test for first 10 rivers
    assert r == ['Addlestone Bourne', 'Aire Washlands', 'Alconbury Brook', 'Aldingbourne Rife', 'Aller Brook', 'Allison Dyke', 'Alverthorpe Beck', 'Ampney Brook', 'Amwell Loop', 'Arkle Beck']

def test_stations_by_rivers():
    stations = build_station_list()
    s = stations_by_river(stations, "River Cam")
 #Test for stations on River Cam
    assert s == ['Cam', 'Cambridge', 'Cambridge Baits Bite', 'Cambridge Jesus Lock', 'Dernford', 'Great Chesterford', 'Weston Bampfylde']

test_rivers_with_stations()
test_stations_by_rivers()
#Build list of stations #Test for No. of stations with at least one monitoring station # Test for first 10 rivers #Test for stations on River Cam