(self, _)
| 1414 | class TestFlushDnsCache(BaseStdout): |
| 1415 | @mock.patch("subprocess.call", return_value=0) |
| 1416 | def test_flush_darwin(self, _): |
| 1417 | with self.mock_property("platform.system") as obj: |
| 1418 | obj.return_value = "Darwin" |
| 1419 | flush_dns_cache() |
| 1420 | |
| 1421 | expected = ( |
| 1422 | "Flushing the DNS cache to utilize new hosts " |
| 1423 | "file...\nFlushing the DNS cache requires " |
| 1424 | "administrative privileges. You might need to " |
| 1425 | "enter your password." |
| 1426 | ) |
| 1427 | output = sys.stdout.getvalue() |
| 1428 | self.assertIn(expected, output) |
| 1429 | |
| 1430 | @mock.patch("subprocess.call", return_value=1) |
| 1431 | def test_flush_darwin_fail(self, _): |
nothing calls this directly
no test coverage detected