Opened 19 years ago

Closed 19 years ago

#637 closed defect (duplicate)

Errors in tests - sqlite

Reported by: Bless Owned by: Adrian Holovaty
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: no UI/UX: no

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:

Change History (1)

comment:1 by Adrian Holovaty, 19 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #527.

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