Fix django_extensions testing issue - uggla/opentracks GitHub Wiki
If the following errors happen doing python manage.py test
----------------------------------------------------------------------
FAIL: test_manage_py_print_settings_help (django_extensions.tests.test_print_settings.PrintSettingsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/ctb/django/opentracks/lib/python2.7/site-packages/django_extensions/tests/test_print_settings.py", line 24, in test_manage_py_print_settings_help
self.assertIn('print_settings [options]', output)
File "/home/ctb/django/opentracks/lib/python2.7/site-packages/django_extensions/tests/test_print_settings.py", line 19, in assertIn
self.assertTrue(needle in haystack)
AssertionError: False is not true
----------------------------------------------------------------------
FAIL: test_manage_py_print_settings_json (django_extensions.tests.test_print_settings.PrintSettingsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/ctb/django/opentracks/lib/python2.7/site-packages/django_extensions/tests/test_print_settings.py", line 34, in test_manage_py_print_settings_json
self.assertIn('America/Los_Angeles', output)
File "/home/ctb/django/opentracks/lib/python2.7/site-packages/django_extensions/tests/test_print_settings.py", line 19, in assertIn
self.assertTrue(needle in haystack)
AssertionError: False is not true
----------------------------------------------------------------------
FAIL: test_manage_py_print_settings_no_args (django_extensions.tests.test_print_settings.PrintSettingsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/ctb/django/opentracks/lib/python2.7/site-packages/django_extensions/tests/test_print_settings.py", line 30, in test_manage_py_print_settings_no_args
self.assertIn('America/Los_Angeles', output)
File "/home/ctb/django/opentracks/lib/python2.7/site-packages/django_extensions/tests/test_print_settings.py", line 19, in assertIn
self.assertTrue(needle in haystack)
AssertionError: False is not true
Above issue can be fixed using the following commit.
https://github.com/django-extensions/django-extensions/commit/3f5ea972efdc0773988eff4532f3a855e3956457
Run fix_django_extensions.sh or
Go into virtualenv cd $VIRTUAL_ENV/lib/python2.7/site-packages/ and
mv django_extensions/tests/test_print_settings.py django_extensions/tests/test_print_settings.py.bak
vi django_extensions/tests/__init__.py comment from django_extensions.tests.test_print_settings import PrintSettingsTests
vi django_extensions/tests/uuid_field.py comment :
def testUUIDField_pkAgregateCreate(self): and j = TestAgregateModel.objects.create(a=6)