(self, restore_state)
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):
        """
        Generates a report fixture for mobile that can be used by a report module
        """
        if not self.should_sync(restore_state):
            return []

        restore_user = restore_state.restore_user
        apps = self._get_apps(restore_state, restore_user)
        report_configs = self._get_report_configs(apps)
        if not report_configs:
            return []

        fixtures = []

        needed_versions = {
            app.mobile_ucr_restore_version
            for app in apps
        }

        report_data_cache = ReportDataCache()
        providers = [
            ReportFixturesProviderV1(report_data_cache),
            ReportFixturesProviderV2(report_data_cache)
        ]

        for provider in providers:
            fixtures.extend(provider(restore_state, restore_user, needed_versions, report_configs))

        return fixtures
def __call__ ( self , restore_state ) : if not self . should_sync ( restore_state ) : return [ ] restore_user = restore_state . restore_user apps = self . _get_apps ( restore_state , restore_user ) report_configs = self . _get_report_configs ( apps ) if not report_configs : return [ ] fixtures = [ ] needed_versions = { app . mobile_ucr_restore_version for app in apps } report_data_cache = ReportDataCache ( ) providers = [ ReportFixturesProviderV1 ( report_data_cache ) , ReportFixturesProviderV2 ( report_data_cache ) ] for provider in providers : fixtures . extend ( provider ( restore_state , restore_user , needed_versions , report_configs ) ) return fixtures