I am trying to run tests in django which are placed in tests folder.Following is the output.
python manage.py test
Traceback (most recent call last):
File "manage.py", line 10, in <module> execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 399, in execute_from_command_line utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management __init__.py", line 272, in fetch_command klass = load_command_class(app_name,subcommand)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 75, in load_command_class module = import_module('%s.management.commands.%s' % (app_name, name))
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py",line 40, in import_module __import__(name)
File "/usr/local/lib/python2.7/dist-packages/south/management/commands __init__.py", line 10, in <module> import django.template.loaders.app_directories
File "/usr/local/lib/python2.7/dist-packages/django/template/loaders /app_directories.py", line 23, in <module> mod = import_module(app)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module __import__(name)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/__init__.py", line 6, in <module> from django.contrib.admin.sites import AdminSite, site
File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py", line 4, in <module> from django.contrib.admin.forms import AdminAuthenticationForm
File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/forms.py", line 6, in <module> from django.contrib.auth.forms import AuthenticationForm
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/forms.py", line 17, in <module> from django.contrib.auth.models import User
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/models.py", line 48, in <module> class Permission(models.Model):
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 96, in __new__new_class.add_to_class('_meta', Options(meta, **kwargs))
File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 264, in add_to_class value.contribute_to_class(cls, name)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/options.py", line 124, in contribute_to_class self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "/usr/local/lib/python2.7/dist-packages/django/db/__init__.py", line 34, in __getattr__ return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 196, in __getitem__self.ensure_defaults(alias)
File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 174, in ensure_defaults conn.setdefault('ATOMIC_REQUESTS', False)
AttributeError: 'tuple' object has no attribute 'setdefault'
Can some one help me with this ? I have tried solving by checking the enviornment and i think its correct.Tests run good in production with same enviornment.
Aucun commentaire:
Enregistrer un commentaire