python3 compatibility
This commit is contained in:
Ayub khan
2019-09-30 14:42:55 +05:00
parent 12140e5b78
commit cc4050460e

View File

@@ -270,9 +270,14 @@ class EmailOptInListTest(ModuleStoreTestCase):
@ddt.data(0, 1)
def test_not_enough_args(self, num_args):
args = ["dummy"] * num_args
expected_msg_regex = (
"^Error: too few arguments$"
)
if six.PY2:
expected_msg_regex = (
"^Error: too few arguments$"
)
else:
expected_msg_regex = (
"^Error: the following arguments are required: ORG_ALIASES$"
)
with self.assertRaisesRegexp(CommandError, expected_msg_regex):
call_command('email_opt_in_list', *args)