コード例 #1
0
    def setUpTestData(cls):
        version = factories.VersionFactory()
        build = factories.BuildFactory(product=version.product)

        cls.post_data = {
            'summary': 'Bug created by test suite',
            'product': version.product.pk,
            'version': version.pk,
            'build': build.pk,
        }

        super().setUpTestData()

        # cls.tester is created after calling super() above
        cls.post_data['reporter'] = cls.tester.pk
コード例 #2
0
ファイル: test_permissions.py プロジェクト: rish07/Kiwi
    def setUpTestData(cls):
        version = factories.VersionFactory()
        build = factories.BuildFactory(product=version.product)

        cls.post_data = {
            "summary": "Bug created by test suite",
            "product": version.product.pk,
            "version": version.pk,
            "build": build.pk,
        }

        super().setUpTestData()
        tests.user_should_have_perm(cls.tester, "bugs.view_bug")

        # cls.tester is created after calling super() above
        cls.post_data["reporter"] = cls.tester.pk