def setUpClass(cls): super(TestOpenBookmarks, cls).setUpClass() cls.tester = create_request_user('bookmark_tester', 'password') bookmark_form = BookmarkForm({ 'name': 'plan page', 'url': 'http://localhost/plan/1/', 'user': cls.tester.pk, 'a': 'add', }) bookmark_form.is_valid() cls.bookmark_1 = bookmark_form.save() bookmark_form = BookmarkForm({ 'name': 'case page', 'url': 'http://localhost/case/1/', 'user': cls.tester.pk, 'a': 'add', }) bookmark_form.is_valid() cls.bookmark_2 = bookmark_form.save() bookmark_form = BookmarkForm({ 'name': 'run page', 'url': 'http://localhost/run/1/', 'user': cls.tester.pk, 'a': 'add', }) bookmark_form.is_valid() cls.bookmark_3 = bookmark_form.save()
def setUpTestData(cls): super(TestUploadFile, cls).setUpTestData() cls.password = '******' cls.user = create_request_user(username='******', password=cls.password) user_should_have_perm(cls.user, 'management.add_testattachment') user_should_have_perm(cls.user, 'testcases.add_testcaseattachment')
def setUpTestData(cls): super(TestUploadFile, cls).setUpTestData() cls.upload_file_url = reverse('mgmt-upload_file') cls.password = '******' cls.user = create_request_user(username='******', password=cls.password) user_should_have_perm(cls.user, 'management.add_testattachment') user_should_have_perm(cls.user, 'testcases.add_testcaseattachment')
def setUpClass(cls): super(TestProfilesView, cls).setUpClass() cls.tester = create_request_user('tester', 'password') cls.somebody_else = create_request_user('somebody-else', 'password')
def setUpClass(cls): super().setUpClass() cls.somebody_else = create_request_user("somebody-else", "password")