Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonspeed committed May 1, 2024
1 parent 015cec0 commit 5a577a8
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/twisted/web/test/test_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -2864,31 +2864,13 @@ def test_setResponseCodeAndMessage(self):
b"(no clientproto yet) 202 happily accepted",
)

def test_setResponseCodeAndMessageNotBytes(self):
"""
L{http.Request.setResponseCode} accepts C{bytes} for the message
parameter and raises L{TypeError} if passed anything else.
"""
channel = DummyChannel()
req = http.Request(channel, False)
self.assertRaises(TypeError, req.setResponseCode, 202, "not happily accepted")

def test_setResponseCodeAcceptsIntegers(self):
"""
L{http.Request.setResponseCode} accepts C{int} for the code parameter
and raises L{TypeError} if passed anything else.
"""
req = http.Request(DummyChannel(), False)
req.setResponseCode(1)
self.assertRaises(TypeError, req.setResponseCode, "1")

def test_setResponseCodeAcceptsLongIntegers(self):
"""
L{http.Request.setResponseCode} accepts L{int} for the code
parameter.
"""
req = http.Request(DummyChannel(), False)
req.setResponseCode(1)

def test_setResponseCode418(self):
"""
Expand Down

0 comments on commit 5a577a8

Please sign in to comment.