How to Unit Test a function that use NATS KV #677
Unanswered
Oceanestars
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm looking to Mock the nats server and be able to interact it in my unit test.(Using pytest)
I have a NATS wrapper so I can easily grab the key from the nats bucket
The function I want to test is
I'm trying to use https://github.com/nats-io/nats.py/blob/main/tests/utils.py
When looking for some NATS unit test example, google AI came up with this:
It ran but couldn't figure out how to connect it to the
get_data
function. I thought setting the connection as a python fixture. I wasn't successful either.Any ideas?
Thanks for any help!
Beta Was this translation helpful? Give feedback.
All reactions