Skip to content

Commit

Permalink
test_whitelist.py: fix test_read_configuration()
Browse files Browse the repository at this point in the history
  • Loading branch information
AlyaGomaa committed May 30, 2024
1 parent a6ecbab commit 2df662b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_whitelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,12 +491,12 @@ def test_is_whitelisted_domain_not_found(mock_db):
)


@patch("slips_files.common.parsers.config_parser.ConfigParser")
@patch("slips_files.common.parsers.config_parser.ConfigParser.whitelist_path")
def test_read_configuration(mock_config_parser, mock_db):
mock_config_parser.whitelist_path.return_value = "whitelist.conf"
mock_config_parser.return_value = "expected_value"
whitelist = ModuleFactory().create_whitelist_obj(mock_db)
whitelist.read_configuration()
assert whitelist.whitelist_path == "config/whitelist.conf"
assert whitelist.whitelist_path == mock_config_parser.return_value


@pytest.mark.parametrize(
Expand Down

0 comments on commit 2df662b

Please sign in to comment.