Ask Your Question
0

running manage.py test error

asked 2014-04-07 21:56:01 -0600

Lidya gravatar image

updated 2014-04-07 22:08:42 -0600

Evgeny gravatar image

Hi,

Postgres 9.3.

When i try to run python manage.py test, I got the following error: Could somebody help me? Thanks.

Creating test database for alias 'default'...
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/core/management/__init__.py", line 459, in execute_manager
    utility.execute()
  File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/core/management/commands/test.py", line 49, in run_from_argv
    super(Command, self).run_from_argv(argv)
  File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/home/ec2-user/teachqa/lib/python2.6/site-packages/South-0.8.4-py2.6.egg/south/management/commands/test.py", line 8, in handle
    super(Command, self).handle(*args, **kwargs)
  File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/core/management/commands/test.py", line 72, in handle
    failures = test_runner.run_tests(test_labels)
  File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/test/simple.py", line 381, in run_tests
    old_config = self.setup_databases()
  File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/test/simple.py", line 317, in setup_databases
    self.verbosity, autoclobber=not self.interactive)
  File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/db/backends/creation.py", line 256, in create_test_db
    self._create_test_db(verbosity, autoclobber)
  File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/db/backends/creation.py", line 312, in _create_test_db
    suffix = self.sql_table_creation_suffix()
  File "/home/ec2-user/teachqa/lib/python2.6/site-packages/django/db/backends/postgresql_psycopg2/creation.py", line 38, in sql_table_creation_suffix
    assert self.connection.settings_dict['TEST_COLLATION'] is None, "PostgreSQL does not support collation setting at database creation time."
AssertionError: PostgreSQL does not support collation setting at database creation time.
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-04-07 22:09:26 -0600

Evgeny gravatar image

updated 2014-04-07 22:10:25 -0600

Try commenting out the TEST_COLLATION line in the settings.py.

Also, it might help to specify the apps to run the tests for, otherwise you'll be running all the django test cases and all other apps.

edit flag offensive delete link more

Comments

Hello, It works Thx! You are so helpful. Further to that, running the test askbot, there is 1 failure at: FAIL: test_thread_summary_locmem_cache (askbot.tests.post_model_tests.ThreadRenderLowLevelCachingTests) Traceback (most recent call last): File "/home/ec2-user/teachqasite/askbot/tests/post_model_tests.py", line 370, in test_thread_summary_locmem_cache self.assertTrue(thread.summary_html_cached()) AssertionError: False is not True --- I setup and used memchaced. was that test above for the locmem cache? If so, should i just ignore it since i use memcached? #setup memcached for production use! #see http://docs.djangoproject.com/en/1.1/topics/cache/ for details #CACHE_BACKEND = 'locmem://' #CACHE_BACKEND = 'memcached://127.0.0.1:11211/' CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': '127.0.0.1:11211', 'TIMEOUT': 18000, 'KEY_PREFIX': 'askbot', } } Thanks again in advance!

Lidya gravatar imageLidya ( 2014-04-07 22:33:39 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-04-07 21:56:01 -0600

Seen: 504 times

Last updated: Apr 07 '14