|
22 | 22 | from prompt_toolkit.input import PipeInput, create_pipe_input
|
23 | 23 | from pytest_regressions.file_regression import FileRegressionFixture
|
24 | 24 |
|
25 |
| -from milatools.cli import init_command |
26 |
| -from milatools.cli.init_command import ( |
| 25 | +from milatools.cli import init |
| 26 | +from milatools.cli.init import ( |
27 | 27 | DRAC_CLUSTERS,
|
28 | 28 | _get_drac_username,
|
29 | 29 | _get_mila_username,
|
@@ -845,12 +845,12 @@ def test_setup_windows_ssh_config_from_wsl(
|
845 | 845 | windows_ssh_config_path = windows_home / ".ssh" / "config"
|
846 | 846 |
|
847 | 847 | monkeypatch.setattr(
|
848 |
| - init_command, |
| 848 | + init, |
849 | 849 | running_inside_WSL.__name__,
|
850 | 850 | Mock(spec=running_inside_WSL, return_value=True),
|
851 | 851 | )
|
852 | 852 | monkeypatch.setattr(
|
853 |
| - init_command, |
| 853 | + init, |
854 | 854 | get_windows_home_path_in_wsl.__name__,
|
855 | 855 | Mock(spec=get_windows_home_path_in_wsl, return_value=windows_home),
|
856 | 856 | )
|
@@ -921,15 +921,15 @@ def test_setup_vscode_settings(
|
921 | 921 | json.dump(initial_settings, f, indent=4)
|
922 | 922 |
|
923 | 923 | monkeypatch.setattr(
|
924 |
| - init_command, |
925 |
| - init_command.vscode_installed.__name__, |
926 |
| - Mock(spec=init_command.vscode_installed, return_value=True), |
| 924 | + init, |
| 925 | + init.vscode_installed.__name__, |
| 926 | + Mock(spec=init.vscode_installed, return_value=True), |
927 | 927 | )
|
928 | 928 | monkeypatch.setattr(
|
929 |
| - init_command, |
930 |
| - init_command.get_expected_vscode_settings_json_path.__name__, |
| 929 | + init, |
| 930 | + init.get_expected_vscode_settings_json_path.__name__, |
931 | 931 | Mock(
|
932 |
| - spec=init_command.get_expected_vscode_settings_json_path, |
| 932 | + spec=init.get_expected_vscode_settings_json_path, |
933 | 933 | return_value=vscode_settings_json_path,
|
934 | 934 | ),
|
935 | 935 | )
|
@@ -1005,12 +1005,12 @@ def test_setup_windows_ssh_config_from_wsl_copies_keys(
|
1005 | 1005 | monkeypatch.setattr(Path, "home", Mock(spec=Path.home, return_value=linux_home))
|
1006 | 1006 |
|
1007 | 1007 | monkeypatch.setattr(
|
1008 |
| - init_command, |
| 1008 | + init, |
1009 | 1009 | running_inside_WSL.__name__,
|
1010 | 1010 | Mock(spec=running_inside_WSL, return_value=True),
|
1011 | 1011 | )
|
1012 | 1012 | monkeypatch.setattr(
|
1013 |
| - init_command, |
| 1013 | + init, |
1014 | 1014 | get_windows_home_path_in_wsl.__name__,
|
1015 | 1015 | Mock(spec=get_windows_home_path_in_wsl, return_value=windows_home),
|
1016 | 1016 | )
|
@@ -1570,16 +1570,16 @@ def test_setup_passwordless_ssh_access(
|
1570 | 1570 | spec=setup_passwordless_ssh_access_to_cluster,
|
1571 | 1571 | side_effect=[accept_mila, *(accept_drac for _ in drac_clusters_in_ssh_config)],
|
1572 | 1572 | )
|
1573 |
| - import milatools.cli.init_command |
| 1573 | + import milatools.cli.init |
1574 | 1574 |
|
1575 | 1575 | monkeypatch.setattr(
|
1576 |
| - milatools.cli.init_command, |
| 1576 | + milatools.cli.init, |
1577 | 1577 | setup_passwordless_ssh_access_to_cluster.__name__,
|
1578 | 1578 | mock_setup_passwordless_ssh_access_to_cluster,
|
1579 | 1579 | )
|
1580 | 1580 |
|
1581 | 1581 | monkeypatch.setattr(
|
1582 |
| - milatools.cli.init_command, |
| 1582 | + milatools.cli.init, |
1583 | 1583 | setup_keys_on_login_node.__name__,
|
1584 | 1584 | Mock(spec=setup_keys_on_login_node),
|
1585 | 1585 | )
|
|
0 commit comments