def test_request_group_header_no_conflict(self, request): request.return_value.status_code = HttpStatusCode.Ok session = WrappedSession("") session.request("POST", FAKE_URL, headers={"foo": "bar"}) request.assert_called_once() assert "X-Request-Group" in request.call_args[1]["headers"]
def test_request_group_header_none(self, request): request.return_value.status_code = 200 session = WrappedSession("") session.request("POST", FAKE_URL) request.assert_called_once() assert "X-Request-Group" in request.call_args[1]["headers"]
def test_request_group_header_conflict(self, request): request.return_value.status_code = HttpStatusCode.Ok args = "POST", FAKE_URL kwargs = dict(headers={"X-Request-Group": "f00"}) session = WrappedSession("") session.request(*args, **kwargs) request.assert_called_once_with(*args, **kwargs) # we do nothing here