From 40d7cdc10b8d887acd5b9cda0d0700807ed70bb4 Mon Sep 17 00:00:00 2001 From: AndrewwSS Date: Tue, 4 Jun 2024 15:26:20 +0300 Subject: [PATCH] test fix --- app/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 4f7996bd..9a6ccd53 100644 --- a/app/main.py +++ b/app/main.py @@ -1,4 +1,5 @@ import json +import os from app.car import Car from app.customer import Customer @@ -7,9 +8,11 @@ def shop_trip() -> None: data = {} - with open("config.json", "r") as config: + directory = os.path.dirname(os.path.abspath(__file__)) + with open(f"{directory}/config.json", "r") as config: data = json.load(config) + # Initialize data from dict fuel_price = data["FUEL_PRICE"] customers = []