Offline testing #1781
yann-combarnous
started this conversation in
General
Offline testing
#1781
Replies: 1 comment 3 replies
-
Hi, @yann-combarnous ! Your problem is not related to FastStream itself and we have no tools to help you, but you can use any type of monkeypatching: pytest or unittest one Take a look at the pytest doc about monkeypatching |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I went through the testing examples and would like an advice on how to run the tests offline.
In the below code example, there are 2 parts that need connectivity atm:
KafkaBroker
, which I would like to mock, because even though my test is using TestKafkaBroker, broker is still instantiated and requires connectivitysave
function which would be a database I save my message to, here I would like to mock the save function, with the ability to return a value, and check what it was called withAny advice?
Beta Was this translation helpful? Give feedback.
All reactions