Skip to content

Commit

Permalink
Update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
agerveshi committed Oct 9, 2023
1 parent 84dce0e commit c3008b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/openjd/adaptor_runtime/_entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ def _build_argparser(self) -> ArgumentParser:
path_mapping_rules = ArgumentParser(add_help=False)
path_mapping_rules.add_argument(
"--path-mapping-rules",
default="",
required=False,
type=_load_data,
help=_CLI_HELP_TEXT["path_mapping_rules"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ def test_initializes_backend_process(
adaptor_module.__package__ = "package"
conn_file_path = "/path"
init_data = {"init": "data"}
path_mapping_data = {}
runner = FrontendRunner(conn_file_path)

# WHEN
runner.init(adaptor_module, init_data)
runner.init(adaptor_module, init_data, path_mapping_data)

# THEN
assert caplog.messages == [
Expand All @@ -104,6 +105,8 @@ def test_initializes_backend_process(
conn_file_path,
"--init-data",
json.dumps(init_data),
"--path-mapping-rules",
json.dumps(path_mapping_data),
],
shell=False,
close_fds=True,
Expand Down
2 changes: 1 addition & 1 deletion test/openjd/adaptor_runtime/unit/test_entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def test_runs_background_start(

# THEN
_parse_args_mock.assert_called_once()
mock_magic_init.assert_called_once_with(mock_adaptor_module, {})
mock_magic_init.assert_called_once_with(mock_adaptor_module, {}, {})
mock_magic_start.assert_called_once_with(conn_file)
mock_start.assert_called_once_with()

Expand Down

0 comments on commit c3008b6

Please sign in to comment.