예제 #1
0
 def test_get_number_of_report_configs_by_data_source(self):
     self.assertEqual(
         get_number_of_report_configs_by_data_source(
             self.domain_1.name, self.data_source_id),
         len([report_config for report_config in self.report_configs
              if report_config.domain == self.domain_1.name
              and report_config.config_id == self.data_source_id])
     )
예제 #2
0
 def get_report_count(self):
     """
     Return the number of ReportConfigurations that reference this data source.
     """
     return get_number_of_report_configs_by_data_source(self.domain, self._id)
예제 #3
0
 def count_by_data_source(cls, domain, data_source_id):
     return get_number_of_report_configs_by_data_source(domain, data_source_id)
예제 #4
0
 def count_by_data_source(cls, domain, data_source_id):
     return get_number_of_report_configs_by_data_source(domain, data_source_id)
예제 #5
0
파일: models.py 프로젝트: ekush/commcare-hq
 def get_report_count(self):
     """
     Return the number of ReportConfigurations that reference this data source.
     """
     return get_number_of_report_configs_by_data_source(self.domain, self._id)