(self, restore_state, restore_user, needed_versions, report_configs)
return fixtures
Generates a report fixture for mobile that can be used by a report module
Generates a report fixture for mobile that can be used by a report module
Generates a report fixture for mobile that can be used by a report module
def __call__(self, restore_state, restore_user, needed_versions, report_configs):
        """
        Generates a report fixture for mobile that can be used by a report module
        """
        fixtures = []

        if needed_versions.intersection({MOBILE_UCR_MIGRATING_TO_2, MOBILE_UCR_VERSION_2}):
            synced_fixtures, purged_fixture_ids = self._relevant_report_configs(restore_state, report_configs)

            oldest_sync_time = self._get_oldest_sync_time(restore_state, synced_fixtures, purged_fixture_ids)
            fixtures.append(_get_report_index_fixture(restore_user, oldest_sync_time))
            fixtures.extend(self._v2_fixtures(restore_user, synced_fixtures))
            for report_uuid in purged_fixture_ids:
                fixtures.extend(self._empty_v2_fixtures(report_uuid))

        return fixtures
def __call__ ( self , restore_state , restore_user , needed_versions , report_configs ) : fixtures = [ ] if needed_versions . intersection ( { MOBILE_UCR_MIGRATING_TO_2 , MOBILE_UCR_VERSION_2 } ) : synced_fixtures , purged_fixture_ids = self . _relevant_report_configs ( restore_state , report_configs ) oldest_sync_time = self . _get_oldest_sync_time ( restore_state , synced_fixtures , purged_fixture_ids ) fixtures . append ( _get_report_index_fixture ( restore_user , oldest_sync_time ) ) fixtures . extend ( self . _v2_fixtures ( restore_user , synced_fixtures ) ) for report_uuid in purged_fixture_ids : fixtures . extend ( self . _empty_v2_fixtures ( report_uuid ) ) return fixtures