Example #1
0
 def setUpTestData(cls):
     cls.product_nitrate = f.ProductFactory(name='nitrate')
     cls.product_xmlrpc = f.ProductFactory(name='xmlrpc')
     cls.case_categories = [
         f.TestCaseCategoryFactory(name='auto', product=cls.product_nitrate),
         f.TestCaseCategoryFactory(name='manual', product=cls.product_nitrate),
         f.TestCaseCategoryFactory(name='pending', product=cls.product_xmlrpc),
     ]
Example #2
0
    def setUpTestData(cls):
        super().setUpTestData()

        cls.bz_tracker = cls.create_bz_tracker()

        cls.case_author = f.UserFactory(username='******')
        cls.default_tester = f.UserFactory(username='******')

        cls.case_1.summary = 'Test list case'
        cls.case_1.is_automated = 1
        cls.case_1.is_automated_proposed = True
        cls.case_1.author = cls.case_author
        cls.case_1.default_tester = cls.default_tester
        cls.case_1.category = f.TestCaseCategoryFactory(name='functional',
                                                        product=cls.product)
        cls.case_1.priority = Priority.objects.get(value='P3')
        cls.case_1.case_status = TestCaseStatus.objects.first()
        cls.case_1.save()

        cls.case_1.add_issue('2000', cls.bz_tracker)
        cls.case_1.add_issue('2001', cls.bz_tracker)

        f.TestCaseComponentFactory(case=cls.case_1,
                                   component=f.ComponentFactory(name='db'))
        f.TestCaseComponentFactory(case=cls.case_1,
                                   component=f.ComponentFactory(name='web'))

        f.TestCaseTagFactory(case=cls.case_1,
                             tag=f.TestTagFactory(name='python'))
        f.TestCaseTagFactory(case=cls.case_1,
                             tag=f.TestTagFactory(name='fedora'))
Example #3
0
 def setUpTestData(cls):
     cls.tester = f.UserFactory(username='******')
     cls.product = f.ProductFactory(name='StarCraft')
     cls.version = f.VersionFactory(value='0.1', product=cls.product)
     cls.plan = f.TestPlanFactory(name='Test product.get_cases',
                                  owner=cls.tester,
                                  author=cls.tester,
                                  product=cls.product,
                                  product_version=cls.version)
     cls.case_category = f.TestCaseCategoryFactory(product=cls.product)
     cls.cases_count = 10
     cls.cases = [
         f.TestCaseFactory(category=cls.case_category,
                           author=cls.tester,
                           reviewer=cls.tester,
                           default_tester=None,
                           plan=[cls.plan]) for i in range(cls.cases_count)
     ]
Example #4
0
    def test_update(self):
        TestCase.update(
            self.case_1.pk, {
                'category':
                f.TestCaseCategoryFactory(name='functional',
                                          product=self.product),
                'is_automated':
                1,
                'notes':
                '',
                'script':
                '',
            })

        case = TestCase.objects.get(pk=self.case_1.pk)

        category = TestCaseCategory.objects.get(name='functional',
                                                product=self.product)

        self.assertEqual(category, case.category)
        self.assertEqual(1, case.is_automated)
        self.assertEqual('', case.notes)
        self.assertEqual('', case.script)
Example #5
0
 def setUpTestData(cls):
     cls.product = f.ProductFactory(name='StarCraft')
     cls.category = f.TestCaseCategoryFactory(name='manual',
                                              product=cls.product)
Example #6
0
 def setUpTestData(cls):
     cls.product = f.ProductFactory(name='Nitrate')
     cls.categories = [
         f.TestCaseCategoryFactory(name='auto', product=cls.product),
         f.TestCaseCategoryFactory(name='manual', product=cls.product),
     ]