Opened 12 years ago

Closed 12 years ago

#1832 closed defect (fixed)

bug in test "basic", exception for missing fields has changed

Reported by: mir@… Owned by: Adrian Holovaty
Component: Database layer (models, ORM) Version: master
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


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/", line 1243, in __run\n    compileflags, 1) in test.globs\n  File "<doctest basic[70]>", line 1, in ?\n    Article.objects.dates(\'invalid_field\', \'year\')\n  File "/home/mir/src/django/active/django/db/models/", line 57, in dates\n    return self.get_query_set().dates(*args, **kwargs)\n  File "/home/mir/src/django/active/django/db/models/", 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/", 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 12 years ago by anonymous

Severity: criticalnormal
Summary: relations are broken, test "basic" fails.bug in test "basic", exception for missing fields has changed

ehm, it's something different than I expected. The bug is raised because the Exception message has changes slightly. Not really critical, sorry.

comment:2 Changed 12 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

Fixed in [2898].

Note: See TracTickets for help on using tickets.
Back to Top