Exemple #1
0
def test_get_sensors_by_station_id(stat_id, expected):
    db = DbManager()

    result = db.get_sensors_by_station_id(stat_id)
    assert type(result) == list
    assert len(result) == expected

    with pytest.raises(DbManagerError):
        db.get_sensors_by_station_id("")
        db.get_sensors_by_station_id(None)