Beispiel #1
0
 def test_get_coverage_with_projenct_name(self):
     api.create_coverage('foo1_project')
     api.create_coverage('foo2_project')
     covs = api.get_coverage(project_name='foo1_project')
     self.assertTrue(covs is not None)
     self.assertEqual(len(covs), 1)
     self.assertEqual(covs[0].project_name, 'foo1_project')
Beispiel #2
0
 def test_get_coverage_with_metadata(self):
     api.create_coverage('foo1_project', coverage_metadata="foo,bar")
     api.create_coverage('foo2_project', coverage_metadata="bar,foo")
     covs = api.get_coverage(project_name='foo1_project')
     self.assertTrue(covs is not None)
     self.assertEqual(len(covs), 1)
     self.assertEqual(covs[0].project_name, 'foo1_project')
     self.assertEqual(covs[0].coverage_metadata, 'foo,bar')
Beispiel #3
0
 def test_get_coverage_all(self):
     api.create_coverage('foo1_project')
     api.create_coverage('foo2_project')
     covs = api.get_coverage()
     self.assertTrue(covs is not None)
     self.assertEqual(len(covs), 2)
     names = [n.project_name for n in covs]
     self.assertIn(needle='foo1_project', haystack=names)
     self.assertIn(needle='foo2_project', haystack=names)
Beispiel #4
0
def process_results(project_name=".", coverage_rate=0.0, rates=[]):
    session = api.get_session()
    cov = api.create_coverage(project_name,
                              coverage_rate,
                              rates,
                              test_type=CONF.test_type,
                              session=session)
    api.add_file_rates(cov.id, rates, session)
    session.close()
Beispiel #5
0
 def test_create_coverage(self):
     cov = api.create_coverage('foo_project')
     self.assertTrue(cov is not None)
     self.assertEqual(cov.project_name, 'foo_project')
Beispiel #6
0
 def test_create_coverage(self):
     cov = api.create_coverage('foo_project')
     self.assertTrue(cov != None)
     self.assertEqual(cov.project_name, 'foo_project')