Skip to content

Commit

Permalink
fix config issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethjmyers committed Apr 26, 2024
1 parent 6402d16 commit 8279f1a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions model/test_discordUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import responses


PATH_OF_THIS_FILE = os.path.dirname(os.path.abspath(__file__))
THIS_DIR = os.path.dirname(os.path.abspath(__file__))


@pytest.fixture(scope='module')
Expand All @@ -17,7 +17,7 @@ def cfg():
cfg_file = cu.find_config()
except FileNotFoundError as e:
print(e)
cfg_file = os.path.join(PATH_OF_THIS_FILE, "../example_reddit.cfg")
cfg_file = os.path.join(THIS_DIR, "../example_reddit.cfg")
cfg = cu.parse_config(cfg_file)
return cfg

Expand Down
14 changes: 7 additions & 7 deletions model/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ def modelName():

@pytest.fixture(scope='module')
def cfg():
try:
cfg_file = cu.find_config()
except FileNotFoundError as e:
print(e)
cfg_file = os.path.join(PATH_OF_THIS_FILE, "../example_reddit.cfg")
cfg = cu.parse_config(cfg_file)
return cfg
try:
cfg_file = cu.find_config()
except FileNotFoundError as e:
print(e)
cfg_file = os.path.join(THIS_DIR, "../example_reddit.cfg")
cfg = cu.parse_config(cfg_file)
return cfg


# need to find a way to mock this, couldn't find anything that does that
Expand Down
2 changes: 2 additions & 0 deletions model/test_modelUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from moto import mock_s3
import pytest
import os


THIS_DIR = os.path.dirname(os.path.abspath(__file__))


Expand Down

0 comments on commit 8279f1a

Please sign in to comment.