def _save_form_data(app_id, received_on=cls.correct_date, device_id=cls.DEVICE_ID):
     save_to_es_analytics_db(
         domain=cls.DOMAIN_NAME,
         received_on=received_on,
         device_id=device_id,
         user_id=cls.user_id,
         app_id=app_id,
     )
 def _save_form_data(self, app_id, received_on):
     save_to_es_analytics_db(
         domain=self.DOMAIN_NAME,
         received_on=received_on,
         device_id=self.DEVICE_ID,
         user_id=self.user._id,
         app_id=app_id,
     )
 def _save_form_data(app_id, received_on=cls.correct_date, device_id=cls.DEVICE_ID):
     save_to_es_analytics_db(
         domain=cls.DOMAIN_NAME,
         received_on=received_on,
         device_id=device_id,
         user_id=cls.user_id,
         app_id=app_id,
     )
Exemple #4
0
def test_app_submission_breakdown(self, combination_count_list):
    """
    The breakdown of this report is (app, device, userid, username): count
    """
    domain = 'test-data-analytics'
    received = datetime(2016, 3, 24)
    month = DateSpan.from_month(3, 2016)
    for app, device, userid, username, count in combination_count_list:
        for i in range(count):
            save_to_es_analytics_db(domain, received, app, device, userid, username)

    self.es.indices.refresh(XFORM_INDEX_INFO.index)
    data_back = get_app_submission_breakdown_es(domain, month)
    normalized_data_back = set(data_back)
    self.assertEqual(set(combination_count_list), normalized_data_back)
Exemple #5
0
def test_app_submission_breakdown(self, combination_count_list):
    """
    The breakdown of this report is (app, device, userid, username): count
    """
    domain = 'test-data-analytics'
    received = datetime(2016, 3, 24)
    month = DateSpan.from_month(3, 2016)
    for app, device, userid, username, count in combination_count_list:
        for i in range(count):
            save_to_es_analytics_db(domain, received, app, device, userid, username)

    self.es.indices.refresh(XFORM_INDEX_INFO.index)
    data_back = get_app_submission_breakdown_es(domain, month)
    normalized_data_back = set(data_back)
    self.assertEqual(set(combination_count_list), normalized_data_back)