Hi,
I'm writing tests around nameko and I'm trying to figure out the best way
to reset the state of my rabbitmq in between tests. Does nameko or kombu
have a way to do this? (Ideally something like, nameko.test.reset_queues())
Thanks!
Hi,
I'm writing tests around nameko and I'm trying to figure out the best way
to reset the state of my rabbitmq in between tests. Does nameko or kombu
have a way to do this? (Ideally something like, nameko.test.reset_queues())
Thanks!
If you use pytest, the fixtures will do this for you.
See https://github.com/nameko/nameko/blob/master/nameko/testing/pytest.py,
in particular `rabbit_config`, `vhost_pipeline` and `fast_teardown`. They
all work together to make sure every test is isolated in rabbit, and that
the tests run as quickly as possible.
If you're not using pytest for some reason, you may be able to import the
fixtures and use them as bare functions.
On Thursday, May 18, 2017 at 7:19:48 PM UTC+1, di...@clearmetal.com wrote:
Hi,
I'm writing tests around nameko and I'm trying to figure out the best way
to reset the state of my rabbitmq in between tests. Does nameko or kombu
have a way to do this? (Ideally something like, nameko.test.reset_queues())Thanks!