diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_server.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_server.py b/tests/test_server.py index 05f6b4e..508b382 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -185,6 +185,7 @@ class TestWSGIServer(unittest.TestCase): inst.adj = DummyAdj inst._map = {"a": 1, "b": 2} self.assertFalse(inst.readable()) + self.assertTrue(inst.in_connection_overflow) def test_readable_maplen_lt_connection_limit(self): inst = self._makeOneWithMap() @@ -192,6 +193,19 @@ class TestWSGIServer(unittest.TestCase): inst.adj = DummyAdj inst._map = {} self.assertTrue(inst.readable()) + self.assertFalse(inst.in_connection_overflow) + + def test_readable_maplen_toggles_connection_overflow(self): + inst = self._makeOneWithMap() + inst.accepting = True + inst.adj = DummyAdj + inst._map = {"a": 1, "b": 2} + self.assertFalse(inst.in_connection_overflow) + self.assertFalse(inst.readable()) + self.assertTrue(inst.in_connection_overflow) + inst._map = {} + self.assertTrue(inst.readable()) + self.assertFalse(inst.in_connection_overflow) def test_readable_maintenance_false(self): import time |