def METHOD_NAME(self):
    inventory = make_inventory(hosts=("@local",))
    State(inventory, Config())
    host = inventory.get_host("@local")
    fake_process = MagicMock(returncode=1)
    self.fake_popen_mock.return_value = fake_process
    with self.assertRaises(IOError):
        host.put_file("not-a-file", "not-another-file", print_output=True)