(self, Local)
| 295 | class sudo: |
| 296 | @patch(local_path) |
| 297 | def prefixes_command_with_sudo(self, Local): |
| 298 | runner = Local.return_value |
| 299 | Context().sudo("whoami") |
| 300 | # NOTE: implicitly tests default sudo.prompt conf value |
| 301 | cmd = "sudo -S -p '[sudo] password: ' whoami" |
| 302 | assert runner.run.called, "sudo() never called runner.run()!" |
| 303 | assert runner.run.call_args[0][0] == cmd |
| 304 | |
| 305 | @patch(local_path) |
| 306 | def optional_user_argument_adds_u_and_H_flags(self, Local): |