-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for get_vehicle_schedules_on_date function.
We also add one substitute operating day to additional datasets. In the last part of the tests, we modify the one dataset in the test to avoid adding 5-10 different dataset just to change one or two attributes.
- Loading branch information
1 parent
b05ad67
commit f0391a9
Showing
5 changed files
with
1,336 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...tional-sets/substitute-operating-days-by-line-types/stoppingBusServiceThursday20230406.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { TypeOfLine } from 'generic/networkdb/datasets/types'; | ||
import { DateTime } from 'luxon'; | ||
import { HslTimetablesDbTables } from '../../schema'; | ||
import { DayOfWeek } from '../../types'; | ||
|
||
export const stoppingBusServiceThursday20230406SubstituteOperatingDayByLineType = | ||
{ | ||
substitute_operating_day_by_line_type_id: | ||
'5d7a31de-1236-4c94-b737-509bae0ea578', | ||
type_of_line: TypeOfLine.StoppingBusService, | ||
superseded_date: DateTime.fromISO('2023-04-06'), | ||
substitute_day_of_week: DayOfWeek.Sunday, | ||
}; | ||
|
||
export const stoppingBusServiceSaturday20230406Dataset: TableData<HslTimetablesDbTables>[] = | ||
[ | ||
{ | ||
name: 'service_calendar.substitute_operating_day_by_line_type', | ||
data: [ | ||
stoppingBusServiceThursday20230406SubstituteOperatingDayByLineType, | ||
], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.