Skip to content

Commit

Permalink
fix: ensure that a test config is used for khal
Browse files Browse the repository at this point in the history
  • Loading branch information
Bart-Steensma committed Nov 26, 2023
1 parent 809eaca commit 43a45fa
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/test_khal/helpers.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
from tests.agenda_items import Valid
from os.path import join
from unittest.mock import patch

from khalorg.khal.calendar import Calendar
from khalorg.org.agenda_items import OrgAgendaItem

from tests import static
from tests.agenda_items import Valid
from tests.helpers import get_module_path


class Mixin:

def setUp(self) -> None:
@patch('khalorg.khal.calendar.find_configuration_file')
def setUp(self, patch) -> None:
patch.return_value = join(get_module_path(static), 'test_config_khal')
args: list = Valid.get_args()
self.agenda_item: OrgAgendaItem = OrgAgendaItem(*args)
self.calendar = Calendar('test_calendar')

0 comments on commit 43a45fa

Please sign in to comment.