Code

Opened 9 years ago

Closed 9 years ago

#637 closed defect (duplicate)

Errors in tests - sqlite

Reported by: Bless Owned by: adrian
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

  1. 911 - Python 2.4.2 - sqlite-3.2.1 - pysqlite-2.0.4

Running tests with database 'sqlite3'

'one_to_one' module: API test raised an exception
=================================================
Code: "w = r.add_waiter(name='Joe')"
Line: 40
Exception:   File "/home/bless/django/django_src/tests/doctest.py", line 1243, in __r
un
    compileflags, 1) in test.globs
  File "<doctest one_to_one[13]>", line 1, in ?
    w = r.add_waiter(name='Joe')
  File "/usr/lib/python2.4/site-packages/django/utils/functional.py", line 3, in _cur
ried
    return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items()))
  File "/usr/lib/python2.4/site-packages/django/core/meta/__init__.py", line 950, in 
method_add_related
    obj = rel_mod.Klass(**init_kwargs)
  File "/usr/lib/python2.4/site-packages/django/utils/functional.py", line 3, in _cur
ried
    return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items()))
  File "/usr/lib/python2.4/site-packages/django/core/meta/__init__.py", line 762, in 
method_init
    raise TypeError, "Invalid value: %r should be a %s instance, not a %s" % (f.name,
 f.rel.to, type(rel_obj))
TypeError: Invalid value: 'restaurant' should be a <Options for restaurants> instance
, not a <class 'django.models.one_to_one.Restaurant'>


'one_to_one' module: API test raised an exception
=================================================
Code: 'w.save()'
Line: 41
Exception:   File "/home/bless/django/django_src/tests/doctest.py", line 1243, in __r
un
    compileflags, 1) in test.globs
  File "<doctest one_to_one[14]>", line 1, in ?
    w.save()
NameError: name 'w' is not defined


'one_to_one' module: API test raised an exception
=================================================
Code: 'w'
Line: 42
Exception:   File "/home/bless/django/django_src/tests/doctest.py", line 1243, in __r
un
    compileflags, 1) in test.globs
  File "<doctest one_to_one[15]>", line 1, in ?
    w
NameError: name 'w' is not defined

3 errors:

Attachments (0)

Change History (1)

comment:1 Changed 9 years ago by adrian

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #527.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.