Django ignores router when running tests?

前端 未结 3 644
没有蜡笔的小新
没有蜡笔的小新 2021-02-18 18:58

I have a django application that uses 2 database connections:

  1. To connect to the actual data the app is to produce
  2. To a reference master data system, that
3条回答
  •  名媛妹妹
    2021-02-18 19:55

    You could try to mock out the connection to the second database using python mocks?https://pypi.python.org/pypi/mock -- now part of the stdlib in python 3.

提交回复
热议问题