def setUpClass(cls): reset_es_index(USER_INDEX_INFO) reset_es_index(XFORM_INDEX_INFO) cls.domain = create_domain('xform-management-test') cls.web_user = WebUser.create('xform-management-test', 'test', 'test', None, None, is_superuser=True) Client().force_login(cls.web_user.get_django_user())
def setUp(self): self.group_name = 'justice league' self.domain = 'group-esaccessors-test' self.reporting = True self.case_sharing = False self.es = get_es_new() reset_es_index(GROUP_INDEX_INFO)
def setUpClass(cls): super(UserAnalyticsTest, cls).setUpClass() delete_all_users() cls.domain = create_domain('test') cls.active_user = CommCareUser.create( domain='test', username='******', password='******', created_by=None, created_via=None, is_active=True, ) cls.active_user_2 = CommCareUser.create( domain='test', username='******', password='******', created_by=None, created_via=None, is_active=True, ) cls.inactive_user = CommCareUser.create(domain='test', username='******', password='******', created_by=None, created_via=None, is_active=False) cls.web_user = WebUser.create( domain='test', username='******', password='******', created_by=None, created_via=None, ) reset_es_index(USER_INDEX_INFO) update_analytics_indexes()
def setUpClass(cls): cls.project = Domain.get_or_create_with_name( cls.project_name, is_active=True, use_sql_backend=cls.use_sql_backend) cls.project.save() cls.elasticsearch = get_es_new() reset_es_index(XFORM_INDEX_INFO) reset_es_index(CASE_INDEX_INFO)
def setUpClass(cls): reset_es_index(USER_INDEX_INFO) super().setUpClass() cls.definition = CustomDataFieldsDefinition( domain=cls.domain.name, field_type=UserFieldsView.field_type) cls.definition.save() cls.definition.set_fields([ Field( slug='imaginary', label='Imaginary Person', choices=['yes', 'no'], ), ]) cls.definition.save() cls.profile = CustomDataFieldsProfile( name='character', fields={'imaginary': 'yes'}, definition=cls.definition, ) cls.profile.save()
def setUpClass(cls): delete_all_cases() cls.project = Domain.get_or_create_with_name(cls.project_name, is_active=True) cls.project.save() cls.elasticsearch = get_es_new() reset_es_index(XFORM_INDEX_INFO) reset_es_index(CASE_INDEX_INFO) reset_es_index(CASE_SEARCH_INDEX_INFO)
def setup_es_form_index(): reset_es_index(XFORM_INDEX_INFO)
def setup_es_case_index(): reset_es_index(CASE_INDEX_INFO)
def setUp(self): self.es = get_es_new() reset_es_index(CASE_INDEX_INFO) initialize_index_and_mapping(self.es, CASE_INDEX_INFO)
def setUp(self): self.domain = 'group-esaccessors-test' self.reporting = True self.es = get_es_new() reset_es_index(GROUP_INDEX_INFO)
def setUp(self): super(SqlSMSPillowTest, self).setUp() self.elasticsearch = get_es_new() reset_es_index(SMS_INDEX_INFO)
def setUpClass(cls): reset_es_index(USER_INDEX_INFO) super().setUpClass()
def setUp(self): super().setUp() FormProcessorTestUtils.delete_all_xforms() self.elasticsearch = get_es_new() reset_es_index(XFORM_INDEX_INFO)
def setUpClass(cls): setup_es_case_index() reset_es_index(USER_INDEX_INFO) super(TestODataCaseFeed, cls).setUpClass() cls._set_up_class() cls._setup_accounting()