(self)
| 124 | main(["-n", "-p", "0"]) |
| 125 | |
| 126 | def test_range_opt(self): |
| 127 | ftpd = main(["-r", "60000-61000", "-p", "0"]) |
| 128 | assert ftpd.handler.passive_ports == list(range(60000, 61000 + 1)) |
| 129 | |
| 130 | # without arg |
| 131 | with pytest.raises(SystemExit): |
| 132 | main(["-r"]) |
| 133 | # wrong arg |
| 134 | with pytest.raises(SystemExit): |
| 135 | main(["-r", "yyy-zzz"]) |
| 136 | |
| 137 | def test_debug_opt(self): |
| 138 | main(["-D", "-p", "0"]) |