def class_setup_reindex(cls):
        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_v2_ledgers()
        FormProcessorTestUtils.delete_all_sql_cases()

        cls.first_batch_domain = cls._get_doc_ids(
            cls._create_docs(cls.domain, 4))
        cls.first_batch_global = cls.first_batch_domain + cls._get_doc_ids(
            cls._create_docs(cls.other_domain, 4))
        cls.middle = datetime.utcnow()
        time.sleep(.02)
        cls.second_batch_domain = cls._get_doc_ids(
            cls._create_docs(cls.domain, 4))
        cls.second_batch_global = cls.second_batch_domain + cls._get_doc_ids(
            cls._create_docs(cls.other_domain, 4))
        time.sleep(.02)
        cls.end = datetime.utcnow()

        cls.all_doc_ids = cls.first_batch_global + cls.second_batch_global
        cls.all_doc_ids_domain = cls.first_batch_domain + cls.second_batch_domain

        cls._analyse()
 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_v2_ledgers()
     FormProcessorTestUtils.delete_all_sql_cases()
 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_v2_ledgers()
     FormProcessorTestUtils.delete_all_sql_cases()
Example #4
0
    def class_setup_reindex(cls):
        cls.domain = uuid.uuid4().hex
        # since this test depends on the global form list just wipe everything
        FormProcessorTestUtils.delete_all_sql_forms()
        FormProcessorTestUtils.delete_all_v2_ledgers()
        FormProcessorTestUtils.delete_all_sql_cases()

        cls.first_batch = cls._get_doc_ids(cls._create_docs(4))
        cls.middle = datetime.utcnow()
        time.sleep(.02)
        cls.second_batch = cls._get_doc_ids(cls._create_docs(4))
        time.sleep(.02)
        cls.end = datetime.utcnow()

        cls._analyse()
 def tearDownClass(cls):
     FormProcessorTestUtils.delete_all_sql_forms()
     FormProcessorTestUtils.delete_all_v2_ledgers()
     FormProcessorTestUtils.delete_all_sql_cases()
     super(BaseReindexAccessorTest, cls).tearDownClass()
 def class_teardown_reindex(cls):
     FormProcessorTestUtils.delete_all_sql_forms()
     FormProcessorTestUtils.delete_all_v2_ledgers()
     FormProcessorTestUtils.delete_all_sql_cases()
Example #7
0
 def class_teardown_reindex(cls):
     FormProcessorTestUtils.delete_all_sql_forms()
     FormProcessorTestUtils.delete_all_v2_ledgers()
     FormProcessorTestUtils.delete_all_sql_cases()
 def tearDownClass(cls):
     FormProcessorTestUtils.delete_all_sql_forms()
     FormProcessorTestUtils.delete_all_v2_ledgers()
     FormProcessorTestUtils.delete_all_sql_cases()
     super(BaseReindexAccessorTest, cls).tearDownClass()