async def test__move_with_emergency_stop(data, monkeypatch): monkeypatch.setattr(BaseItinerary, "required_keys", fake_required_keys) monkeypatch.setattr(BaseItinerary, "stations", fake_stations_emergency_stop) base_itinerary = BaseItinerary(data) await base_itinerary.move() assert base_itinerary.get_answers() == []
def test__stations(data, monkeypatch): monkeypatch.setattr(BaseItinerary, "required_keys", fake_required_keys) with pytest.raises(NotImplementedError): BaseItinerary(data).stations()
async def test__move(data, monkeypatch): monkeypatch.setattr(BaseItinerary, "required_keys", fake_required_keys) monkeypatch.setattr(BaseItinerary, "stations", fake_stations) base_itinerary = BaseItinerary(data) await base_itinerary.move() assert base_itinerary.get_answers() == [ANSWER]
async def test__move(data, monkeypatch): monkeypatch.setattr(BaseItinerary, "required_keys", fake_required_keys) base_itinerary = BaseItinerary(data) assert base_itinerary.train.data == data
def test__data_has_required_keys_not_correct(data, monkeypatch): monkeypatch.setattr(BaseItinerary, "required_keys", fake_required_keys_not_correct) base_itinerary = BaseItinerary(data) assert base_itinerary.data_has_required_keys() is False
def test__required_keys(data): with pytest.raises(NotImplementedError): BaseItinerary(data)