示例#1
0
 def setUp(self):
     super(ReportNamesTest, self).setUp()
     self.SetUpApp([('/api/report_names', report_names.ReportNamesHandler)])
     self.SetCurrentClientIdOAuth(api_auth.OAUTH_CLIENT_ID_WHITELIST[0])
     report_template.ReportTemplate(internal_only=False,
                                    name='external').put()
     report_template.ReportTemplate(internal_only=True,
                                    name='internal').put()
  def setUp(self):
    super(ReportTemplateTest, self).setUp()
    stored_object.Set(descriptor.PARTIAL_TEST_SUITES_KEY, [])
    stored_object.Set(descriptor.COMPOSITE_TEST_SUITES_KEY, [])
    stored_object.Set(descriptor.GROUPABLE_TEST_SUITE_PREFIXES_KEY, [])
    descriptor.Descriptor.ResetMemoizedConfigurationForTesting()

    report_template.ReportTemplate(
        id='ex-id',
        name='external',
        owners=[testing_common.EXTERNAL_USER.email()],
        template={'rows': [], 'statistics': ['avg']}).put()
    report_template.ReportTemplate(
        internal_only=True,
        name='internal',
        id='in-id',
        owners=[testing_common.INTERNAL_USER.email()],
        template={'rows': [], 'statistics': ['avg']}).put()
示例#3
0
 def testReport(self):
   self._CreateAnomaly()
   self._CreateAnomaly(test='adept/android/lodging/assessment/story')
   report_template.ReportTemplate(name='foo', id=42, template={'rows': [{
       'testSuites': ['lodging'],
       'measurement': 'assessment',
       'bots': ['adept:android'],
       'testCases': ['story']}]}).put()
   response = self._Post(report=42)
   self.assertEqual(1, len(response['anomalies']))
   self.assertEqual('android', response['anomalies'][0]['bot'])