bug in test "basic", exception for missing fields has changed
|Reported by:||mir@…||Owned by:||adrian|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
From the tests (using sqlite3) -- I'm already looking into it.
'basic' module: API test failed =============================== Code: "Article.objects.dates('invalid_field', 'year')" Line: 182 Expected: 'Traceback (most recent call last):\n ...\nFieldDoesNotExist: name=invalid_field\n' Got: 'Traceback (most recent call last):\n File "/home/mir/src/django/trunk/tests/doctest.py", line 1243, in __run\n compileflags, 1) in test.globs\n File "<doctest basic>", line 1, in ?\n Article.objects.dates(\'invalid_field\', \'year\')\n File "/home/mir/src/django/active/django/db/models/manager.py", line 57, in dates\n return self.get_query_set().dates(*args, **kwargs)\n File "/home/mir/src/django/active/django/db/models/query.py", line 275, in dates\n field = self.model._meta.get_field(field_name, many_to_many=False)\n File "/home/mir/src/django/active/django/db/models/options.py", line 97, in get_field\n raise FieldDoesNotExist, \'%s has no field named %r\' % (self.object_name, name)\nFieldDoesNotExist: Article has no field named \'invalid_field\'\n'
There was also a report on django-users, and I fell into this with my own app, too.
It's svn #2881
Change History (2)
comment:1 Changed 10 years ago by anonymous
- Severity changed from critical to normal
- Summary changed from relations are broken, test "basic" fails. to bug in test "basic", exception for missing fields has changed