here's the relevant portion of my model.py:



class Event(OrganizerMetaDataExtension):
        name =                                          StringCol(length=200, 
alternateID=True, notNone=True)
        dependancies =                                  MultipleJoin( 
'Dependancy')
        resources =                                     RelatedJoin( 'Resource' 
)
        to_do =                                         RelatedJoin( 
'OrganizerTaskItem' )

        schedule_preference =                           
EnumCol(enumValues=['earlier','later'],
default='earlier')
        explicit_date =                                 
DateTimeCol(default=None)
        completion_date =                               
DateTimeCol(default=None)





when i attempt to run the following nosetest:



from turbogears import testutil, database
from organizer.model import *

database.set_db_uri("sqlite:///:memory:")

class TestEvent(testutil.DBTest):

        def test_event_creation(self):
                e=Event(name="Event Name")
                assert e.name == "Event Name"





i get the following errors:





ERROR: test_event_creation (organizer.tests.test_model.TestEvent)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/home/kerinin/Projects/web/organizer/organizer/tests/test_model.py",
line 15, in test_event_creation
    e=Event(name="Event Name")
  File
"/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1860-py2.4.egg/sqlobject/declarative.py",
line 93, in _wrapper
    return fn(self, *args, **kwargs)
  File
"/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1860-py2.4.egg/sqlobject/main.py",
line 1197, in __init__
    self._create(id, **kw)
  File
"/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1860-py2.4.egg/sqlobject/main.py",
line 1221, in _create
    self.set(**kw)
  File
"/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1860-py2.4.egg/sqlobject/main.py",
line 1099, in set
    raise AttributeError, '%s (with attribute %r)' % (e, name)
AttributeError: 'NoneType' object has no attribute 'read' (with
attribute 'explicit_date')

----------------------------------------------------------------------
Ran 1 test in 1.696s

FAILED (errors=1)




is this a bug in nosetest, or have i done something i should have?
thanks for any help


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to