def setUp(self): FormProcessorTestUtils.delete_all_cases(self.domain) FormProcessorTestUtils.delete_all_ledgers(self.domain) with trap_extra_setup(ConnectionError): self.pillow = get_ledger_to_elasticsearch_pillow() self.elasticsearch = get_es_new() ensure_index_deleted(LEDGER_INDEX_INFO.index) initialize_index_and_mapping(get_es_new(), LEDGER_INDEX_INFO)
def setUp(self): super(LedgerPillowTestCouch, self).setUp() FormProcessorTestUtils.delete_all_ledgers(self.domain) FormProcessorTestUtils.delete_all_cases(self.domain) with trap_extra_setup(ConnectionError): self.pillow = get_ledger_to_elasticsearch_pillow() self.elasticsearch = get_es_new() ensure_index_deleted(LEDGER_INDEX_INFO.index) initialize_index_and_mapping(get_es_new(), LEDGER_INDEX_INFO)
def setUpClass(cls): if settings.USE_PARTITIONED_DATABASE: # https://github.com/nose-devs/nose/issues/946 raise SkipTest('Only applicable if no sharding is setup') super(BaseReindexAccessorTest, cls).setUpClass() cls.domain = uuid.uuid4().hex cls.other_domain = uuid.uuid4().hex # since this test depends on the global form list just wipe everything FormProcessorTestUtils.delete_all_sql_forms() FormProcessorTestUtils.delete_all_ledgers() FormProcessorTestUtils.delete_all_sql_cases()
def tearDown(self): FormProcessorTestUtils.delete_all_ledgers(self.domain) super(LedgerDBAccessorTest, self).tearDown()
def tearDown(self): FormProcessorTestUtils.delete_all_xforms(self.domain) FormProcessorTestUtils.delete_all_ledgers(self.domain) FormProcessorTestUtils.delete_all_cases(self.domain) super(SubmissionSQLTransactionsTest, self).tearDown()
def delete_all_ledgers(): FormProcessorTestUtils.delete_all_ledgers()
def tearDown(self): ensure_index_deleted(LEDGER_INDEX_INFO.index) FormProcessorTestUtils.delete_all_ledgers(self.domain) FormProcessorTestUtils.delete_all_cases(self.domain) super(LedgerPillowTestCouch, self).tearDown()
def tearDown(self): FormProcessorTestUtils.delete_all_ledgers(self.domain) super(LedgerDBAccessorTest, self).tearDown()
def tearDown(self): FormProcessorTestUtils.delete_all_xforms(self.domain) FormProcessorTestUtils.delete_all_ledgers(self.domain) FormProcessorTestUtils.delete_all_cases(self.domain) super(SubmissionSQLTransactionsTest, self).tearDown()
def tearDownClass(cls): FormProcessorTestUtils.delete_all_sql_forms() FormProcessorTestUtils.delete_all_ledgers() FormProcessorTestUtils.delete_all_sql_cases() super(BaseReindexAccessorTest, cls).tearDownClass()
def tearDown(self): ensure_index_deleted(LEDGER_INDEX_INFO.index) FormProcessorTestUtils.delete_all_ledgers(self.domain) FormProcessorTestUtils.delete_all_cases(self.domain) super(LedgerPillowTest, self).tearDown()
def delete_all_ledgers(): FormProcessorTestUtils.delete_all_ledgers()