@@ -17,8 +17,8 @@ class TestSSHSetup(BaseTest):
1717 @pytest .fixture (scope = "function" )
1818 def project (test , tmp_path , setup_ssh_container ):
1919 """
20- Make a project as per usual, but now add
21- in test ssh configurations
20+ Set up a project with configs for SSH into
21+ the test Dockerfile image.
2222 """
2323 tmp_path = tmp_path / "test with space"
2424
@@ -39,15 +39,10 @@ def test_verify_ssh_central_host_do_not_accept(
3939 self , capsys , project , input_
4040 ):
4141 """
42- Use the main function to test this. Test the sub-function
43- when accepting, because this main function will also
44- call setup ssh key pairs which we don't want to do yet
45-
46- This should only accept for "y" so try some random strings
47- including "n" and check they all do not make the connection.
42+ Test that host not accepted if input is not "y".
4843 """
4944 orig_builtin = copy .deepcopy (builtins .input )
50- builtins .input = lambda _ : "y" # type: ignore
45+ builtins .input = lambda _ : input_ # type: ignore
5146
5247 project .setup_ssh_connection ()
5348
@@ -82,8 +77,8 @@ def test_verify_ssh_central_host_accept(self, capsys, project):
8277
8378 def test_generate_and_write_ssh_key (self , project ):
8479 """
85- Check ssh key for passwordless connection is written
86- to file
80+ Check ssh key for passwordless connection
81+ is written to file.
8782 """
8883 path_to_save = project .cfg ["local_path" ] / "test"
8984 ssh .generate_and_write_ssh_key (path_to_save )
0 commit comments