From 31b748a8684cc50b47ec11a075f9e25e4d3e8f0b Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Thu, 22 Dec 2016 03:35:51 -0400 Subject: [PATCH] Update runtests management command to work with Django 1.10 --- mayan/apps/common/management/commands/runtests.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/mayan/apps/common/management/commands/runtests.py b/mayan/apps/common/management/commands/runtests.py index 16766a195d..ba51455c15 100644 --- a/mayan/apps/common/management/commands/runtests.py +++ b/mayan/apps/common/management/commands/runtests.py @@ -9,18 +9,17 @@ from django.core import management class Command(management.BaseCommand): help = 'Run all configured tests for the project.' - option_list = management.BaseCommand.option_list + ( - make_option( + def add_arguments(self, parser): + parser.add_argument( '--nomigrations', action='store_true', dest='nomigrations', default=False, help='Don\'t use migrations when creating the test database.' - ), - make_option( - '--reverse', action='store_true', dest='reverse', - default=False, + ) + + parser.add_argument( + '--reverse', action='store_true', dest='reverse', default=False, help='Reverses test cases order.' - ), - ) + ) def handle(self, *args, **options): kwargs = {}