Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update and fix tests #41

Closed

Conversation

sn0opy
Copy link
Contributor

@sn0opy sn0opy commented Apr 3, 2024

Several tests failed due to the date/time in the journey() request being out of the timetable period. I fixed that by actually using the current date. I assume this could still fail on public holidays or weekends with a different timetables.

Some others failed because I was running tests on a Windows machine which is using a different encoding when opening files which broke German umlauts. Passing the correct encoding to open() fixes that.

The nasa/requests/journeys_test.py still fails with the following error: location missing or invalid. After double checking the station IDs they seem to be valid and one can still request journeys at https://reiseauskunft.insa.de/ and https://www.insa.de/fahrplanauskunft. No idea why.

@leona-ya
Copy link
Member

leona-ya commented Jun 9, 2024

I'll make a different version based on this PR as the DB updated their HAFAS tonight and with that changed the journey id format from seperated by the legacy | to #. Thanks tho :3

@leona-ya leona-ya closed this Jun 9, 2024
@leona-ya
Copy link
Member

I fixed the tests a bit different because your fix relied on the fact that timetables don't change. See 7d9c389 and 64832a3

@sn0opy sn0opy deleted the fix/update_and_fix_tests branch June 13, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants