Skip to content


Subversion checkout URL

You can clone with
Download ZIP


FAIL: test_error_logging (django_extensions.tests.management_command.CommandTest) #279

miratcan opened this Issue · 8 comments

4 participants

self.assertEqual(len(handler.messages['error']), 1)
    AssertionError: 0 != 1

Is that known error? else i'll send a patch. :o)


I don't think it's a known error.

Strange it seems to pass travis...

I'm happy to accept a patch :)


This test only passes if INSTALLED_APPS includes:


That's because this test relies on tests/management/commands/ to be imported.

I'm not sure how to make this test work without changing because the command list is imported before the tests/ is even called.


Please try it with version efbea83


I already tried something like this. This trick doesn't work because execute() in calls get_commands(), which loads INSTALLED_APPS before everything is run. The command-list is cached then. Appending to INSTALLED_APPS doesn't affect subsequent calls to get_commands().


Please try again with the above command.

Now importing the module explicitly via importlib.


Works now. Thanks!


Great :)

@trbs trbs closed this

I'm still getting the same error.

FAIL: test_error_logging (django_extensions.tests.management_command.CommandTest)
Traceback (most recent call last):
  File "/opt/virtenvs/django_slice/local/lib/python2.7/site-packages/django_extensions/tests/", line 48, in test_error_logging
    self.assertEqual(len(handler.messages['error']), 1)
AssertionError: 0 != 1

> pip freeze | grep extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.