Ejemplo n.º 1
0
 def setUp(self):
     super(DomainPillowTest, self).setUp()
     self.index_info = DOMAIN_INDEX_INFO
     self.elasticsearch = get_es_new()
     delete_all_domains()
     ensure_index_deleted(self.index_info.index)
     initialize_index(self.elasticsearch, self.index_info)
Ejemplo n.º 2
0
 def setUp(self):
     super(DomainPillowTest, self).setUp()
     self.index_info = DOMAIN_INDEX_INFO
     self.elasticsearch = get_es_new()
     delete_all_domains()
     ensure_index_deleted(self.index_info.index)
     initialize_index(self.elasticsearch, self.index_info)
Ejemplo n.º 3
0
 def test_domain_reindexer(self):
     delete_all_domains()
     ensure_index_deleted(DOMAIN_INDEX)
     name = 'reindex-test-domain'
     create_domain(name)
     reindex_and_clean('domain')
     results = DomainES().run()
     self.assertEqual(1, results.total, results.hits)
     domain_doc = results.hits[0]
     self.assertEqual(name, domain_doc['name'])
     self.assertEqual('Domain', domain_doc['doc_type'])
     delete_es_index(DOMAIN_INDEX)
Ejemplo n.º 4
0
 def test_domain_reindexer(self):
     delete_all_domains()
     ensure_index_deleted(DOMAIN_INDEX)
     name = 'reindex-test-domain'
     create_domain(name)
     call_command('ptop_reindexer_v2', index='domain', cleanup=True, noinput=True)
     results = DomainES().run()
     self.assertEqual(1, results.total, results.hits)
     domain_doc = results.hits[0]
     self.assertEqual(name, domain_doc['name'])
     self.assertEqual('Domain', domain_doc['doc_type'])
     delete_es_index(DOMAIN_INDEX)
Ejemplo n.º 5
0
 def test_domain_reindexer(self):
     delete_all_domains()
     ensure_index_deleted(DOMAIN_INDEX)
     name = 'reindex-test-domain'
     create_domain(name)
     call_command('ptop_reindexer_v2', 'domain', cleanup=True, noinput=True)
     results = DomainES().run()
     self.assertEqual(1, results.total, results.hits)
     domain_doc = results.hits[0]
     self.assertEqual(name, domain_doc['name'])
     self.assertEqual('Domain', domain_doc['doc_type'])
     delete_es_index(DOMAIN_INDEX)
 def tearDownClass(cls):
     cls.commcare_user.delete(deleted_by=None)
     cls.web_user.delete(deleted_by=None)
     delete_all_domains()
     super(DigestOtaRestoreTest, cls).tearDownClass()
Ejemplo n.º 7
0
 def tearDownClass(cls):
     cls.commcare_user.delete(deleted_by=None)
     delete_all_domains()
     super(FormplayerRestoreTest, cls).tearDownClass()
Ejemplo n.º 8
0
 def tearDown(self):
     self.commcare_user.delete()
     self.web_user.delete()
     delete_all_domains()
Ejemplo n.º 9
0
 def tearDown(self):
     self.commcare_user.delete()
     self.web_user.delete()
     delete_all_domains()
Ejemplo n.º 10
0
 def tearDownClass(cls):
     cls.commcare_user.delete()
     cls.web_user.delete()
     delete_all_domains()
     super(DigestOtaRestoreTest, cls).tearDownClass()
Ejemplo n.º 11
0
 def setUpClass(cls):
     delete_all_domains()
     super().setUpClass()
Ejemplo n.º 12
0
 def tearDownClass(cls):
     delete_all_users()
     delete_all_domains()
     cls.config.delete()
     cls.report.delete()
     super(DomainChoiceProviderTest, cls).tearDownClass()