(self)
| 1438 | self.assertIn(expected, output) |
| 1439 | |
| 1440 | def test_flush_windows(self): |
| 1441 | with self.mock_property("platform.system") as obj: |
| 1442 | obj.return_value = "win32" |
| 1443 | |
| 1444 | with self.mock_property("os.name"): |
| 1445 | os.name = "nt" |
| 1446 | flush_dns_cache() |
| 1447 | |
| 1448 | expected = ( |
| 1449 | "Automatically flushing the DNS cache is " |
| 1450 | "not yet supported.\nPlease copy and paste " |
| 1451 | "the command 'ipconfig /flushdns' in " |
| 1452 | "administrator command prompt after running " |
| 1453 | "this script." |
| 1454 | ) |
| 1455 | output = sys.stdout.getvalue() |
| 1456 | self.assertIn(expected, output) |
| 1457 | |
| 1458 | @mock.patch("os.path.isfile", return_value=False) |
| 1459 | def test_flush_no_tool(self, _): |
nothing calls this directly
no test coverage detected