Пример #1
0
 def test_check_status_code_ok(self):
     resp = mock.Mock()
     resp.status_code = 200
     assert utils.check_status_code(resp) is None
Пример #2
0
 def test_check_status_code_fail(self):
     resp = mock.Mock()
     resp.status_code = 400
     with self.assertRaises(StatusCodeError):
         utils.check_status_code(resp)
Пример #3
0
    def test_check_status_code_fail(self):
        resp = Mock()
        resp.status_code = 400

        with self.assertRaises(StatusCodeError):
            check_status_code(resp)
Пример #4
0
    def test_check_status_code_ok(self):
        resp = Mock()
        resp.status_code = 200

        assert check_status_code(resp) is None
Пример #5
0
    def test_check_status_code_ok(self):
        resp = Mock()
        resp.status_code = 200

        assert check_status_code(resp) is None