0

I would like to ask about a certain topic that is tough one. Im working in a project that has microservices architecture with more than 1 databases running every time. in django, how can I perform unit tests to it? im like everything is in a different database and totally seperate and the whole idea of unit tests seperates everything more.

I tried to use mocking, but the problem is that I need certain information from the other database to run some tests in another one. the problem is that I dont know how to run 2 databases (temporal for the unit test purposes) concurrently.

2
  • 1
    This won't help, but if your test involves more than one component, it's not a unit test. Integration and other tests are still important, but keep the scope in mind so you are testing what you want to test. Commented Sep 30 at 20:18
  • Have you tried the approach in the Django docs for handling multiple databses during tests? Or am I misunderstanding your question? Commented Oct 1 at 15:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.