Merge pull request #28723 from edx/iamsobanjaved/django-30-db-args

test: fix skip-checks in a test for django 30
This commit is contained in:
Muhammad Soban Javed
2021-09-16 13:47:37 +05:00
committed by GitHub

View File

@@ -3,6 +3,7 @@ Tests the ``notify_credentials`` management command.
"""
import django
from datetime import datetime
from unittest import mock
@@ -286,7 +287,10 @@ class TestNotifyCredentials(TestCase):
# Told to use it, and enabled. Should use config in preference of command line
self.expected_options['start_date'] = '2017-03-01T00:00:00Z'
del self.expected_options['skip_checks']
if django.VERSION >= (3, 0):
self.expected_options['skip_checks'] = False
else:
del self.expected_options['skip_checks']
call_command(Command(), '--start-date', '2017-01-01', '--args-from-database')
assert mock_task.called
assert mock_task.call_args[0][0] == self.expected_options