def create_mock_user(self, is_staff=True, is_enrolled=True):
     """
     Creates a mock user with the specified properties.
     """
     user = UserFactory(is_staff=is_staff)
     user.is_enrolled = is_enrolled
     return user
Beispiel #2
0
 def create_mock_user(self, is_staff=True, is_enrolled=True):
     """
     Creates a mock user with the specified properties.
     """
     user = UserFactory(is_staff=is_staff)
     user.is_enrolled = is_enrolled
     return user
Beispiel #3
0
 def create_mock_user(self, is_authenticated=True, is_staff=True, is_enrolled=True):
     """
     Creates a mock user with the specified properties.
     """
     user = UserFactory()
     user.name = 'mock_user'
     user.is_staff = is_staff
     user.is_enrolled = is_enrolled
     user.is_authenticated = lambda: is_authenticated
     return user
Beispiel #4
0
 def create_mock_user(self, is_authenticated=True, is_staff=True, is_enrolled=True):
     """
     Creates a mock user with the specified properties.
     """
     user = UserFactory()
     user.name = 'mock_user'
     user.is_staff = is_staff
     user.is_enrolled = is_enrolled
     user.is_authenticated = lambda: is_authenticated
     return user