コード例 #1
0
ファイル: test_axiomatic.py プロジェクト: bne/squeal
    def test_axiomaticCommandProvides(self):
        """
        Test that AxiomaticCommand itself does not provide IAxiomaticCommand or
        IPlugin, but subclasses do.
        """
        self.failIf(IAxiomaticCommand.providedBy(axiomatic.AxiomaticCommand), 'IAxiomaticCommand provided')
        self.failIf(IPlugin.providedBy(axiomatic.AxiomaticCommand), 'IPlugin provided')

        class _TestSubClass(axiomatic.AxiomaticCommand):
            pass

        self.failUnless(IAxiomaticCommand.providedBy(_TestSubClass), 'IAxiomaticCommand not provided')
        self.failUnless(IPlugin.providedBy(_TestSubClass), 'IPlugin not provided')
コード例 #2
0
ファイル: test_axiomatic.py プロジェクト: giorgil/axiom
    def test_axiomaticCommandProvides(self):
        """
        Test that AxiomaticCommand itself does not provide IAxiomaticCommand or
        IPlugin, but subclasses do.
        """
        self.failIf(IAxiomaticCommand.providedBy(axiomatic.AxiomaticCommand), 'IAxiomaticCommand provided')
        self.failIf(IPlugin.providedBy(axiomatic.AxiomaticCommand), 'IPlugin provided')

        class _TestSubClass(axiomatic.AxiomaticCommand):
            pass

        self.failUnless(IAxiomaticCommand.providedBy(_TestSubClass), 'IAxiomaticCommand not provided')
        self.failUnless(IPlugin.providedBy(_TestSubClass), 'IPlugin not provided')
コード例 #3
0
ファイル: test_athena.py プロジェクト: calston/tums
 def test_providesInterfaces(self):
     """
     Verify that the necessary interfaces for the object to be found as a
     twistd subcommand plugin are provided.
     """
     self.failUnless(IPlugin.providedBy(widgetServiceMaker))
     self.failUnless(IServiceMaker.providedBy(widgetServiceMaker))
コード例 #4
0
ファイル: test_tap.py プロジェクト: amitgandhinz/mimic
 def test_plugin(self):
     """
     :obj:`twisted.plugins.mimic.mimicService` is a twistd plugin
     referencing `mimic.tap.makeService`.
     """
     self.assertTrue(IPlugin.providedBy(mimicService))
     self.assertTrue(IServiceMaker.providedBy(mimicService))
     self.assertIs(mimicService.makeService, makeService)
コード例 #5
0
ファイル: test_tap.py プロジェクト: rahulb-rackspace/mimic
 def test_plugin(self):
     """
     :obj:`twisted.plugins.mimic.mimicService` is a twistd plugin
     referencing `mimic.tap.makeService`.
     """
     self.assertTrue(IPlugin.providedBy(mimicService))
     self.assertTrue(IServiceMaker.providedBy(mimicService))
     self.assertIs(mimicService.makeService, makeService)