#26009: contenttypes_tests fail when run in isolation
-----------------------------------+--------------------------------------
     Reporter:  knbk               |                    Owner:  nobody
         Type:  Bug                |                   Status:  new
    Component:  Testing framework  |                  Version:  1.9
     Severity:  Normal             |               Resolution:
     Keywords:                     |             Triage Stage:  Unreviewed
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  1                  |                    UI/UX:  0
-----------------------------------+--------------------------------------
Changes (by knbk):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Old description:

> 2 models in tests/order_with_respect_to/models.py are missing an explicit
> app_label.
>
> {{{
> $ python runtests.py --parallel=1
> contenttypes_tests.test_order_with_respect_to
> Testing against Django installed in '/vagrant/django/django'
> Traceback (most recent call last):
>   File "runtests.py", line 450, in <module>
>     options.debug_sql, options.parallel)
>   File "runtests.py", line 267, in django_tests
>     extra_tests=extra_tests,
>   File "/vagrant/django/django/test/runner.py", line 531, in run_tests
>     suite = self.build_suite(test_labels, extra_tests)
>   File "/vagrant/django/django/test/runner.py", line 422, in build_suite
>     tests = self.test_loader.loadTestsFromName(label)
>   File "/usr/lib/python3.4/unittest/loader.py", line 105, in
> loadTestsFromName
>     module = __import__('.'.join(parts_copy))
>   File
> "/vagrant/django/tests/contenttypes_tests/test_order_with_respect_to.py",
> line 1, in <module>
>     from order_with_respect_to.tests import (
>   File "/vagrant/django/tests/order_with_respect_to/tests.py", line 9, in
> <module>
>     from .models import Answer, Dimension, Entity, Post, Question
>   File "/vagrant/django/tests/order_with_respect_to/models.py", line 48,
> in <module>
>     class Entity(models.Model):
>   File "/vagrant/django/django/db/models/base.py", line 102, in __new__
>     "INSTALLED_APPS." % (module, name)
> RuntimeError: Model class order_with_respect_to.models.Entity doesn't
> declare an explicit app_label and isn't in an application in
> INSTALLED_APPS.
> }}}

New description:

 3 models in `tests/order_with_respect_to/models.py` are missing an
 explicit `app_label`.

 {{{
 $ python runtests.py --parallel=1
 contenttypes_tests.test_order_with_respect_to
 Testing against Django installed in '/vagrant/django/django'
 Traceback (most recent call last):
   File "runtests.py", line 450, in <module>
     options.debug_sql, options.parallel)
   File "runtests.py", line 267, in django_tests
     extra_tests=extra_tests,
   File "/vagrant/django/django/test/runner.py", line 531, in run_tests
     suite = self.build_suite(test_labels, extra_tests)
   File "/vagrant/django/django/test/runner.py", line 422, in build_suite
     tests = self.test_loader.loadTestsFromName(label)
   File "/usr/lib/python3.4/unittest/loader.py", line 105, in
 loadTestsFromName
     module = __import__('.'.join(parts_copy))
   File
 "/vagrant/django/tests/contenttypes_tests/test_order_with_respect_to.py",
 line 1, in <module>
     from order_with_respect_to.tests import (
   File "/vagrant/django/tests/order_with_respect_to/tests.py", line 9, in
 <module>
     from .models import Answer, Dimension, Entity, Post, Question
   File "/vagrant/django/tests/order_with_respect_to/models.py", line 48,
 in <module>
     class Entity(models.Model):
   File "/vagrant/django/django/db/models/base.py", line 102, in __new__
     "INSTALLED_APPS." % (module, name)
 RuntimeError: Model class order_with_respect_to.models.Entity doesn't
 declare an explicit app_label and isn't in an application in
 INSTALLED_APPS.
 }}}

--

--
Ticket URL: <https://code.djangoproject.com/ticket/26009#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.5276ff0e9d3160e4499c38980782fe77%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to