Ticket #6118: 6118.patch

File 6118.patch, 673 bytes (added by moijes12, 9 years ago)

Written a test for a scenario where it is called for an object that is not in queued results in a RuntimeError being raised.

  • twisted/web/test/test_http.py

     
    16531653        self.assertRaises(RuntimeError, req.finish)
    16541654
    16551655
     1656    def test_noLongerQueuedRaisesError(self):
     1657        """
     1658        Calling L{Request.noLongerQueued} for an object that is not queued
     1659        results in a L{RuntimeError} being raised.
     1660        """
     1661        request = http.Request(DummyChannel(), False)
     1662        self.assertRaises(RuntimeError, request.noLongerQueued)
     1663
     1664
    16561665
    16571666class MultilineHeadersTestCase(unittest.TestCase):
    16581667    """