old_contents: from __future__ import absolute_import
  from __future__ import unicode_literals
  import os
  from collections import Counter
  from django.test import SimpleTestCase
  from django.test.utils import override_settings
  from corehq.util.test_utils import TestFileMixin
  from corehq.apps.userreports.models import StaticReportConfiguration
  
  
  class TestStaticReportConfig(SimpleTestCase, TestFileMixin):
  
      file_path = ('data', 'static_reports')
      root = os.path.dirname(__file__)
  
      def test_wrap(self):
          wrapped = StaticReportConfiguration.wrap(self.get_json('static_report_config'))
          self.assertEqual(["example", "dimagi"], wrapped.domains)
  
      def test_get_all_json(self):
          with override_settings(STATIC_UCR_REPORTS=[self.get_path('static_report_config', 'json')]):
              all = list(StaticReportConfiguration.all())
              self.assertEqual(2, len(all))
              example, dimagi = all
              self.assertEqual('example', example.domain)
              self.assertEqual('dimagi', dimagi.domain)
              for config in all:
                  self.assertEqual('Custom Title', config.title)
  
      def test_get_all_yaml(self):
          with override_settings(STATIC_UCR_REPORTS=[self.get_path('static_report_config', 'yaml')]):
              all = list(StaticReportConfiguration.all())
              self.assertEqual(2, len(all))
              example, dimagi = all
              self.assertEqual('example', example.domain)
              self.assertEqual('dimagi', dimagi.domain)
              for config in all:
                  self.assertEqual('Custom Title', config.title)
  
      def test_production_config(self):
          for data_source in StaticReportConfiguration.all(ignore_server_environment=True):
              data_source.validate()
  
      def test_for_report_id_conflicts(self):
          counts = Counter(rc.get_id for rc in
                           StaticReportConfiguration.all(ignore_server_environment=True))
          duplicates = [k for k, v in counts.items() if v > 1]
          msg = "The following report configs have duplicate generated report_ids:\n{}".format(
              "\n".join("report_id: {}".format(report_id) for report_id in duplicates)
          )
          self.assertEqual(0, len(duplicates), msg)
  
new_contents: from __future__ import absolute_import
  from __future__ import unicode_literals
  import os
  from collections import Counter
  from django.test import SimpleTestCase
  from django.test.utils import override_settings
  from corehq.util.test_utils import TestFileMixin
  from corehq.apps.userreports.models import StaticReportConfiguration
  
  
  class TestStaticReportConfig(SimpleTestCase, TestFileMixin):
  
      file_path = ('data', 'static_reports')
      root = os.path.dirname(__file__)
  
      def test_wrap(self):
          wrapped = StaticReportConfiguration.wrap(self.get_json('static_report_config'))
          self.assertEqual(["example", "dimagi"], wrapped.domains)
  
      def test_get_all_json(self):
          with override_settings(STATIC_UCR_REPORTS=[self.get_path('static_report_config', 'json')]):
              all = list(StaticReportConfiguration.all())
              self.assertEqual(2, len(all))
              example, dimagi = all
              self.assertEqual('example', example.domain)
              self.assertEqual('dimagi', dimagi.domain)
              for config in all:
                  self.assertEqual('Custom Title', config.title)
  
      def test_get_all_yaml(self):
          with override_settings(STATIC_UCR_REPORTS=[self.get_path('static_report_config', 'yaml')]):
              all = list(StaticReportConfiguration.all())
              self.assertEqual(2, len(all))
              example, dimagi = all
              self.assertEqual('example', example.domain)
              self.assertEqual('dimagi', dimagi.domain)
              for config in all:
                  self.assertEqual('Custom Title', config.title)
  
      def test_production_config(self):
          for report_config in StaticReportConfiguration.all(ignore_server_environment=True):
              report_config.validate()
  
      def test_for_report_id_conflicts(self):
          counts = Counter(rc.get_id for rc in
                           StaticReportConfiguration.all(ignore_server_environment=True))
          duplicates = [k for k, v in counts.items() if v > 1]
          msg = "The following report configs have duplicate generated report_ids:\n{}".format(
              "\n".join("report_id: {}".format(report_id) for report_id in duplicates)
          )
          self.assertEqual(0, len(duplicates), msg)
  
subject: fix name