summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-11-28 16:27:46 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-11-28 16:27:46 +0100
commit1c356825832e549570c690a170a84270022578e5 (patch)
tree9d404d329d61623a62832ddd89fc26742623de4f /tests
parentbfef6800268cdcf0b9118d89f1ce7c3541bd0309 (diff)
Parser now rejects negative port numbers
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/test_announce.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/integration/test_announce.py b/tests/integration/test_announce.py
index ffbc07b..0eee0fe 100644
--- a/tests/integration/test_announce.py
+++ b/tests/integration/test_announce.py
@@ -118,6 +118,9 @@ class AnnounceRejects(TrackerTestCase):
118 def test_a_port_out_of_range_is_rejected(self): 118 def test_a_port_out_of_range_is_rejected(self):
119 self.assert_rejected("info_hash=" + "a" * 20 + "&peer_id=" + "b" * 20 + "&port=65536&left=0") 119 self.assert_rejected("info_hash=" + "a" * 20 + "&peer_id=" + "b" * 20 + "&port=65536&left=0")
120 120
121 def test_a_negative_port_is_rejected(self):
122 self.assert_rejected("info_hash=" + "a" * 20 + "&peer_id=" + "b" * 20 + "&port=-1&left=0")
123
121 def test_a_port_that_is_not_a_number_is_rejected(self): 124 def test_a_port_that_is_not_a_number_is_rejected(self):
122 self.assert_rejected("info_hash=" + "a" * 20 + "&peer_id=" + "b" * 20 + "&port=abc&left=0") 125 self.assert_rejected("info_hash=" + "a" * 20 + "&peer_id=" + "b" * 20 + "&port=abc&left=0")
123 126