test: fix skip-checks in a test for django 30

This commit is contained in:
Soban Javed
2021-09-13 18:32:03 +05:00
parent 15461d3b6e
commit 78afc41d4c

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