diff options
Diffstat (limited to 'tests/integration/test_udp.py')
| -rw-r--r-- | tests/integration/test_udp.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/integration/test_udp.py b/tests/integration/test_udp.py index 1dfa21b..1cb2389 100644 --- a/tests/integration/test_udp.py +++ b/tests/integration/test_udp.py | |||
| @@ -149,5 +149,20 @@ class UdpScrape(TrackerTestCase): | |||
| 149 | sock.close() | 149 | sock.close() |
| 150 | 150 | ||
| 151 | 151 | ||
| 152 | class UdpWorkersConfiguredAfterTheListener(TrackerTestCase): | ||
| 153 | """The harness writes its listen lines first, so this directive lands | ||
| 154 | below them: the position a config file should not care about.""" | ||
| 155 | |||
| 156 | config = "listen.udp.workers 4\n" | ||
| 157 | |||
| 158 | def test_the_tracker_starts_and_still_answers_udp(self): | ||
| 159 | sock, connection_id = self.tracker.udp_connect() | ||
| 160 | try: | ||
| 161 | answer = self.tracker.udp_announce(sock, connection_id, self.hash_for("udpworkers"), left=0) | ||
| 162 | self.assertEqual(answer["seeders"], 1) | ||
| 163 | finally: | ||
| 164 | sock.close() | ||
| 165 | |||
| 166 | |||
| 152 | if __name__ == "__main__": | 167 | if __name__ == "__main__": |
| 153 | unittest.main() | 168 | unittest.main() |
