Skip to content

Commit

Permalink
refacator: remove unused specs and update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
0hsn committed Dec 29, 2024
1 parent 5668116 commit e9340cd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 33 deletions.
14 changes: 7 additions & 7 deletions tests/infrastructure/file_loader_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

@pytest.fixture
def file_n():
return "bitcoin-usd.chk"
return "UserOk.yaml"


@pytest.fixture
Expand Down Expand Up @@ -124,8 +124,8 @@ class TestGenerateAbsPath:
"""Test PathResolver"""

@staticmethod
def test_generate_abs_path_pass():
ctx = FileContext.from_file(tests.RES_DIR + "bitcoin-usd.chk")
def test_generate_abs_path_pass(get_FileContext_v1):
ctx, _ = get_FileContext_v1
p_base = ctx.filepath

path_1 = "tests/resources/storage/sample_config/bitcoin-usd-testcase-data.chk"
Expand Down Expand Up @@ -164,8 +164,8 @@ def test_generate_abs_path_pass():
class TestFileLoaderIsFileOk:
"""Create tests"""

def test_pass_with_default_allowed_list(self):
file_name = FILE_PATH + "bitcoin-usd.chk"
def test_pass_with_default_allowed_list(self, get_FileContext_v1):
_, file_name = get_FileContext_v1
assert FileLoader.is_file_ok(file_name) is True

def test_fail_with_default_allowed_list_file_not_found(self):
Expand All @@ -182,8 +182,8 @@ def test_pass_with_given_allowed_list(self):
class TestFileLoaderLoadYaml:
"""Create tests"""

def test_pass_valid_file(self):
file_name = FILE_PATH + "bitcoin-usd.chk"
def test_pass_valid_file(self, get_FileContext_v1):
_, file_name = get_FileContext_v1
loaded_content = FileLoader.load_yaml(file_name)

assert isinstance(loaded_content, dict)
Expand Down
3 changes: 3 additions & 0 deletions tests/resources/storage/sample_config/UserOk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ version: 'default:http:0.7.2'
request:
url: https://reqres.in/api/users/1
method: GET

expose:
- <% _response.body %>

This file was deleted.

7 changes: 0 additions & 7 deletions tests/resources/storage/sample_config/bitcoin-usd.chk

This file was deleted.

0 comments on commit e9340cd

Please # to comment.