From 06b7c31e25ea355946814da03749ae197c68d969 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Tue, 27 Oct 2026 03:24:12 +0100 Subject: Fix some tests to match retired stats modes and wrong config file ordering --- tests/integration/test_udp.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/integration/test_udp.py') 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): sock.close() +class UdpWorkersConfiguredAfterTheListener(TrackerTestCase): + """The harness writes its listen lines first, so this directive lands + below them: the position a config file should not care about.""" + + config = "listen.udp.workers 4\n" + + def test_the_tracker_starts_and_still_answers_udp(self): + sock, connection_id = self.tracker.udp_connect() + try: + answer = self.tracker.udp_announce(sock, connection_id, self.hash_for("udpworkers"), left=0) + self.assertEqual(answer["seeders"], 1) + finally: + sock.close() + + if __name__ == "__main__": unittest.main() -- cgit v1.3