django-elasticsearch-dsl icon indicating copy to clipboard operation
django-elasticsearch-dsl copied to clipboard

Changed setUp and tearDown to classmethods setUpClass and tearDownClass

Open macher91 opened this issue 6 years ago • 1 comments

To make more generic creating tests I changed setUp and tearDown to classmethods setUpClass and tearDownClass. Now you don't need create setUp and remeber to put everywhere ex. super().setUp() at the top of setUp()

macher91 avatar Jul 10 '18 13:07 macher91

With this change the index is created once and kept around until python exits. Definitely not the behavior you want. The index should be created at the beginning of each test and deleted after each test. The index should not be reused across tests.

v1kku avatar Aug 03 '18 12:08 v1kku

Have you finally find a solution to setup and teardown between tests properly ?

johnjohnk2 avatar Oct 31 '22 14:10 johnjohnk2