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
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