()
| 10 | |
| 11 | |
| 12 | def setup_daemon(): |
| 13 | stdin = io.BytesIO(u"""ROUTES |
| 14 | {inet},24,0,1.2.3.0,8000,9000 |
| 15 | {inet},32,1,1.2.3.66,8080,8080 |
| 16 | {inet6},64,0,2404:6800:4004:80c::,0,0 |
| 17 | {inet6},128,1,2404:6800:4004:80c::101f,80,80 |
| 18 | NSLIST |
| 19 | {inet},1.2.3.33 |
| 20 | {inet6},2404:6800:4004:80c::33 |
| 21 | PORTS 1024,1025,1026,1027 |
| 22 | GO 1 - - 0x01 12345 |
| 23 | HOST 1.2.3.3,existing |
| 24 | """.format(inet=AF_INET, inet6=AF_INET6).encode('ASCII')) |
| 25 | stdout = Mock() |
| 26 | return stdin, stdout |
| 27 | |
| 28 | |
| 29 | def test_rewrite_etc_hosts(tmpdir): |