Skip to content

Commit

Permalink
Fix minor bug in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
siddardh committed Jun 26, 2023
1 parent 3f04ce9 commit aed90bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/pbench/test/unit/server/test_datasets_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def test_dataset_not_present(self, query_get_as, monkeypatch):
query_get_as(["fio_2"], "drb", HTTPStatus.INTERNAL_SERVER_ERROR)

def test_unsuccessful_get_with_incorrect_data(self, query_get_as, monkeypatch):
@staticmethod
def mock_extract(_tarball_path: Path, _path: str) -> str:
return "IncorrectData"

Expand All @@ -91,6 +92,7 @@ def mock_compare_csv_to_json(
query_get_as(["uperf_1", "uperf_2"], "test", HTTPStatus.INTERNAL_SERVER_ERROR)

def test_tarball_unpack_exception(self, query_get_as, monkeypatch):
@staticmethod
def mock_extract(_tarball_path: Path, _path: str):
raise TarballUnpackError(
_tarball_path, f"Testing unpack exception for path {_path}"
Expand Down

0 comments on commit aed90bc

Please sign in to comment.