@server()
    def test_env_host_set_when_host_prompt_used(self):
        copied_host_string = str(env.host_string)
        fake = Fake('raw_input', callable=True).returns(copied_host_string)
        env.host_string = None
        env.host = None
        with settings(hide('everything'), patched_input(fake)):
            run("ls /")
        # Ensure it did set host_string back to old value
        eq_(env.host_string, copied_host_string)
        # Ensure env.host is correct
        eq_(env.host, normalize(copied_host_string)[1])
Ensure env.host is set during host prompting
dataset/ETHPy150Open fabric/fabric/tests/test_network.py/TestNetwork.test_env_host_set_when_host_prompt_used