fix: Updated the error message in test_bulk_change_enrollment

This commit is contained in:
Jawayria
2021-09-10 15:43:28 +05:00
parent 475a6af2af
commit 06be2cfccd

View File

@@ -5,6 +5,7 @@ from unittest.mock import call, patch
import ddt
import pytest
import django
from django.core.management import call_command
from django.core.management.base import CommandError
@@ -106,7 +107,10 @@ class BulkChangeEnrollmentTests(SharedModuleStoreTestCase):
commit=True,
)
assert 'Error: one of the arguments -c/--course -o/--org is required' == str(err.value)
if django.VERSION < (3,0):
assert 'Error: one of the arguments -c/--course -o/--org is required' == str(err.value)
else:
assert 'Error: argument -o/--org: not allowed with argument -c/--course' == str(err.value)
@patch('common.djangoapps.student.models.tracker')
def test_with_org_and_invalid_to_mode(self, mock_tracker):