userver
C++ Async Framework
Documentation
API Groups
Namespaces
Reference
Class List
Class Index
File List
Macros
All
e
i
l
r
t
u
Functions
Macros
e
i
l
r
t
u
Examples
Toggle main menu visibility
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
All results
__init__.py
1
"""
2
Mocks for the gRPC servers.
3
4
@sa @ref scripts/docs/en/userver/tutorial/grpc_service.md
5
@sa @ref pytest_userver.plugins.grpc.mockserver
6
"""
7
8
import
grpc
# noqa # pylint: disable=unused-import
9
10
11
class
MockedError
(Exception):
12
"""
13
@brief Base class for mocked exceptions.
14
@alias pytest_userver.grpc.MockedError
15
"""
16
17
ERROR_CODE =
'unknown'
18
19
11
class
MockedError
(Exception):
…
20
class
TimeoutError
(
MockedError
):
# pylint: disable=redefined-builtin
21
"""
22
@brief When thrown from a mocked handler, leads to `ugrpc::client::RpcInterruptedError`.
23
@alias pytest_userver.grpc.TimeoutError
24
"""
25
26
ERROR_CODE =
'timeout'
27
28
20
class
TimeoutError
(
MockedError
):
# pylint: disable=redefined-builtin
…
29
class
NetworkError
(
MockedError
):
30
"""
31
@brief When thrown from a mocked handler, leads to `ugrpc::client::RpcInterruptedError`.
32
@alias pytest_userver.grpc.NetworkError
33
"""
34
35
ERROR_CODE =
'network'
29
class
NetworkError
(
MockedError
):
…
Docs version:
v1.0
,
v2.0
,
trunk/develop
testsuite
pytest_plugins
pytest_userver
grpc
__init__.py
Generated on Thu Mar 13 2025 18:41:21 for userver by
Doxygen
1.10.0