コード例 #1
0
    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))
コード例 #2
0
    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))
コード例 #3
0
    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))
コード例 #4
0
    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))
コード例 #5
0
    def test_interfaces(self):
        obj = self.portal.get('my-dx')

        self.assertTrue(IFoo.providedBy(obj),
                        'IFoo interface not provided by Object my-dx')
コード例 #6
0
    def test_foo_folder_interfaces(self):
        foo = self.portal.get('foo')

        self.assertTrue(IFoo.providedBy(foo),
                        'IFoo interface not provided by Folder foo')
コード例 #7
0
    def test_interfaces(self):
        obj = self.portal.get('my-dx')

        self.assertTrue(IFoo.providedBy(obj),
                        'IFoo interface not provided by Object my-dx')
コード例 #8
0
    def test_foo_folder_interfaces(self):
        foo = self.portal.get('foo')

        self.assertTrue(IFoo.providedBy(foo),
                        'IFoo interface not provided by Folder foo')