mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 15:48:29 +02:00
Add tests for courses, change study guide description
This commit is contained in:
parent
c6958d22f3
commit
9819e82638
3 changed files with 37 additions and 2 deletions
|
|
@ -3,6 +3,7 @@ from typing import Optional
|
|||
|
||||
import dacite
|
||||
import json
|
||||
from os import path
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
@ -16,7 +17,9 @@ class Course:
|
|||
|
||||
def load_courses() -> dict[str, Course]:
|
||||
"""Create a list of all courses"""
|
||||
with open("files/courses.json", "r") as file:
|
||||
# Allows testing
|
||||
filepath = path.join(path.dirname(__file__), "..", "files", "courses.json")
|
||||
with open(filepath, "r") as file:
|
||||
data = json.load(file)
|
||||
|
||||
courses = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue