Changeset 267


Ignore:
Timestamp:
Aug 5, 2011, 8:08:45 PM (6 years ago)
Author:
guillaume
Message:

[test] extend unittests: objects references

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tentacles/trunk/test/04_objects.py

    r230 r267  
    7373                self.assertEqual(len(Group.__refs__), 2)
    7474
    75                 print User.__dict__, Group.__dict__
     75                # testing Reference inter-relations
     76                o  = Group.__fields__['owner']
     77                gm = User.__fields__['Group__owner']
     78                self.assertEqual(o.__owner__, Group)
     79                self.assertEqual(gm.__owner__, User)
     80                self.assertEqual(o.sibling, gm)
     81                self.assertEqual(gm.sibling, o)
     82
     83                self.assertEqual(o.remote , (User, 'Group__owner'))
     84                self.assertEqual(gm.remote, (Group, 'owner'))
     85
     86                #print User.__dict__, Group.__dict__
     87                #print o.__dict__, gm.__dict__
    7688
    7789"""
Note: See TracChangeset for help on using the changeset viewer.