Beispiel #1
0
    def test_validate_response_201(self):
        response = MockResponse(201, {})

        try:
            gitter._validate_status_code(response)
        except gitter.HTTPStatusException:
            self.fail('Test raised HTTPStatusException unexpectedly!')
Beispiel #2
0
 def test_response_status_code_not_ok(self):
     response = MockResponse(404, {})
     with self.assertRaises(gitter.HTTPStatusException):
         gitter._validate_status_code(response)