def test_interface_also_provided(self): obj = self.create_dummy() self.assertFalse(IFoo.providedBy(obj)) data = ['ftw.inflator.tests.interfaces.IFoo'] self.updater.update(obj, data) self.assertTrue(IFoo.providedBy(obj))
def test_remove_interface(self): obj = self.create_dummy() alsoProvides(obj, IFoo) self.assertTrue(IFoo.providedBy(obj)) data = ['remove:ftw.inflator.tests.interfaces.IFoo'] self.updater.update(obj, data) self.assertFalse(IFoo.providedBy(obj))
def test_interfaces(self): obj = self.portal.get('my-dx') self.assertTrue(IFoo.providedBy(obj), 'IFoo interface not provided by Object my-dx')
def test_foo_folder_interfaces(self): foo = self.portal.get('foo') self.assertTrue(IFoo.providedBy(foo), 'IFoo interface not provided by Folder foo')