Lines Matching refs:http_error
1761 def http_error(status): function
1775 self.assertEqual(http_error(400), "Bad request")
1776 self.assertEqual(http_error(401), "Unauthorized")
1777 self.assertEqual(http_error(403), "Forbidden")
1778 self.assertEqual(http_error(404), "Not found")
1779 self.assertEqual(http_error(418), "I'm a teapot")
1780 self.assertEqual(http_error(123), "Something else")
1781 self.assertEqual(http_error("400"), "Something else")
1782 self.assertEqual(http_error(401 | 403 | 404), "Something else") # 407
1785 def http_error(status): function
1793 self.assertEqual(http_error(400), "Bad request")
1794 self.assertEqual(http_error(401), "Not allowed")
1795 self.assertEqual(http_error(403), "Not allowed")
1796 self.assertEqual(http_error(404), "Not allowed")
1797 self.assertEqual(http_error(418), "I'm a teapot")
1798 self.assertIs(http_error(123), None)
1799 self.assertIs(http_error("400"), None)
1800 self.assertIs(http_error(401 | 403 | 404), None) # 407