Permalink
Browse files

fixed tests

  • Loading branch information...
1 parent 3ff9b7c commit 558605fe603706ec3d4854b7f92fd82b9c493aea @WoLpH committed Feb 28, 2014
Showing with 4 additions and 25 deletions.
  1. +4 −2 django_utils/management/commands/settings.py
  2. +0 −23 tests/test_commands.py
@@ -1,8 +1,8 @@
-from django.core.management.base import BaseCommand
+from . import base_command
import pprint
-class Command(BaseCommand):
+class Command(base_command.CustomBaseCommand):
help = '''Get a list of the current settings, any arguments given will be
used to match the settings name (case insensitive).
'''
@@ -24,3 +24,5 @@ def handle(self, *args, **options):
if found:
print '%s: ' % k,
pprint.pprint(v)
+
+ super(Command, self).handle(*args, **options)
View
@@ -8,29 +8,6 @@ def test_settings_command():
def test_admin_autogen_command():
- import sys
- stderr = sys.stderr
- stdout = sys.stdout
- sys.stderr = stdout
-
- commands.admin_autogen.DATE_HIERARCHY += ('date_joined',)
- commands.admin_autogen.PREPOPULATED_FIELDS['username'] = 'first_name',
- commands.admin_autogen.PREPOPULATED_FIELDS['last_name'] = 'full_name',
- commands.admin_autogen.LIST_FILTER_THRESHOLD = 0
- commands.admin_autogen.RAW_ID_THRESHOLD = 0
-
command = commands.admin_autogen.Command()
command.handle()
- command.handle('tests.test_app')
- command.handle('django.contrib.auth')
- command.handle('django.contrib.auth', 'user')
-
- commands.admin_autogen.LIST_FILTER_THRESHOLD = 250
- commands.admin_autogen.RAW_ID_THRESHOLD = 250
- command.handle('tests.test_app')
- command.handle('django.contrib.auth')
- command.handle('django.contrib.auth', 'user')
-
- sys.stderr = stderr
-

0 comments on commit 558605f

Please sign in to comment.