示例#1
0
class TestHTTPErrorNoReason(unittest.TestCase):
    def setUp(self):
        self.error = HTTPError()

    def test_repr(self):
        self.assertEqual("<HTTPError>", self.error.__repr__())

    def test_str(self):
        self.assertEqual("<HTTPError>", self.error.__str__())
示例#2
0
class TestHTTPErrorWithReason(unittest.TestCase):
    def setUp(self):
        self.error = HTTPError(status_code=300, reason="Test")

    def test_repr(self):
        self.assertEqual("<HTTPError 300 Test>", self.error.__repr__())

    def test_str(self):
        self.assertEqual("<HTTPError 300 Test>", self.error.__str__())
示例#3
0
class TestHTTPErrorNoReason(unittest.TestCase):

    def setUp(self):
        self.error = HTTPError()

    def test_repr(self):
        self.assertEqual('<HTTPError>',
                         self.error.__repr__())

    def test_str(self):
        self.assertEqual('<HTTPError>',
                         self.error.__str__())
示例#4
0
class TestHTTPErrorWithReason(unittest.TestCase):

    def setUp(self):
        self.error = HTTPError(status_code=300,
                               reason="Test")

    def test_repr(self):
        self.assertEqual('<HTTPError 300 Test>',
                         self.error.__repr__())

    def test_str(self):
        self.assertEqual('<HTTPError 300 Test>',
                         self.error.__str__())
示例#5
0
 def setUp(self):
     self.error = HTTPError(status_code=300, reason="Test")
示例#6
0
 def setUp(self):
     self.error = HTTPError()
示例#7
0
 def setUp(self):
     self.error = HTTPError(status_code=300,
                            reason="Test")
示例#8
0
 def setUp(self):
     self.error = HTTPError()