diff --git a/relation/tests.py b/relation/tests.py index 67f942d..1e3a610 100755 --- a/relation/tests.py +++ b/relation/tests.py @@ -15,7 +15,7 @@ from cybertools.relation.interfaces import IRelationRegistry from cybertools.relation.registry import RelationRegistry -class IntIdsStub: +class IntIdsStub(object): """A testing stub (mock utility) for IntIds.""" implements(IIntIds) @@ -25,14 +25,14 @@ class IntIdsStub: def getObject(self, uid): return self.objs[uid] - def getId(self, ob): - return self.objs.index(ob) - def register(self, ob): if ob not in self.objs: self.objs.append(ob) return self.objs.index(ob) + getId = register + queryId = getId + def unregister(self, ob): id = self.getId(ob) self.objs[id] = None