From 32cdf9356801bdc9baa44f5f05c230e1f151bc77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B4mulo=20Penido?= Date: Thu, 1 Feb 2024 13:25:53 -0300 Subject: [PATCH] test: use UserFactory --- .../content_tagging/rest_api/v1/tests/test_views.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/openedx/core/djangoapps/content_tagging/rest_api/v1/tests/test_views.py b/openedx/core/djangoapps/content_tagging/rest_api/v1/tests/test_views.py index 8c6b8e1d0e1c..0c151070eac5 100644 --- a/openedx/core/djangoapps/content_tagging/rest_api/v1/tests/test_views.py +++ b/openedx/core/djangoapps/content_tagging/rest_api/v1/tests/test_views.py @@ -11,6 +11,7 @@ import abc import ddt +from common.djangoapps.student.tests.factories import UserFactory from django.contrib.auth import get_user_model from django.core.files.uploadedfile import SimpleUploadedFile from opaque_keys.edx.locator import BlockUsageLocator, CourseLocator @@ -1636,17 +1637,13 @@ class TestContentObjectChildrenExportView(TaggedCourseMixin, APITestCase): # ty """ def setUp(self): super().setUp() - self.user = User.objects.create( - username="user", - email="user@example.com", - ) - self.staff = User.objects.create( + self.staff = UserFactory.create( username="staff", email="staff@example.com", is_staff=True, ) - self.staffA = User.objects.create( + self.staffA = UserFactory.create( username="staffA", email="userA@example.com", )