Open dev-msln opened 2 years ago
@mojtabasalehiyan I use the following fixture in my test class:
@pytest.fixture(autouse=True, scope="function")
def rebuild_indices(self) -> Generator:
for index in registry.get_indices():
index.delete(ignore=404)
index.create()
As you know, in the Django Settings you can specify a
test
database for Postgresql as follows:Is there a way to specify a test database in elastic-search settings so that all tests data will be inserted into that and after tests ran, all data will be removed from it?