google-code-export / django-page-cms

Automatically exported from code.google.com/p/django-page-cms
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

test: import fails #159

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I use it with buildout.
and when i exec ./bin/django test

I have following error:
Traceback (most recent call last):
  File "./bin/django-admin", line 53, in <module>
    django.core.management.execute_from_command_line()
  File
"/home/arvid/mywork/mishelovka/parts/svn-packages/django/core/management/__init_
_.py",
line 353, in execute_from_command_line
    utility.execute()
  File
"/home/arvid/mywork/mishelovka/parts/svn-packages/django/core/management/__init_
_.py",
line 303, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File
"/home/arvid/mywork/mishelovka/parts/svn-packages/django/core/management/base.py
",
line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File
"/home/arvid/mywork/mishelovka/parts/svn-packages/django/core/management/base.py
",
line 222, in execute
    output = self.handle(*args, **options)
  File
"/home/arvid/mywork/mishelovka/parts/svn-packages/django/core/management/command
s/test.py",
line 23, in handle
    failures = test_runner(test_labels, verbosity=verbosity,
interactive=interactive)
  File
"/home/arvid/mywork/mishelovka/parts/svn-packages/django/test/simple.py",
line 182, in run_tests
    suite.addTest(build_suite(app))
  File
"/home/arvid/mywork/mishelovka/parts/svn-packages/django/test/simple.py",
line 58, in build_suite
    test_module = get_tests(app_module)
  File
"/home/arvid/mywork/mishelovka/parts/svn-packages/django/test/simple.py",
line 16, in get_tests
    test_module = __import__('.'.join(app_path + [TEST_MODULE]), {}, {},
TEST_MODULE)
  File
"/home/arvid/.buildout/eggs/django_page_cms-1.0.7-py2.5.egg/pages/tests/__init__
.py",
line 3, in <module>
    from pages.tests.auto_render import AutoRenderTestCase
  File
"/home/arvid/.buildout/eggs/django_page_cms-1.0.7-py2.5.egg/pages/tests/auto_ren
der.py",
line 5, in <module>
    import settings
ImportError: No module named settings

Please, change the behaviour and use evironment variable
django.conf.ENVIRONMENT_VARIABLE  

Also in module pages_tests.py you do import PagePermission. But it's wrong
because i do not want it and set PAGE_PERMISSION to False.
You should check this option.

Thanks.

Original issue reported on code.google.com by Arv...@gmail.com on 29 Aug 2009 at 8:02

GoogleCodeExporter commented 9 years ago
Fixed in revision 689, but it seems to break a test with the site framework.

Original comment by batiste....@gmail.com on 15 Sep 2009 at 8:07