First time here? Check out the FAQ!
0

running manage.py test error
 

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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Lidya's avatar
3
Lidya
asked 11 years ago
Evgeny's avatar
13.2k
Evgeny
updated 11 years ago

Comments

see more comments

1 Answer

0

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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 11 years ago, updated 11 years ago
link

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's avatar Lidya (11 years ago)
see more comments