Ejemplo n.º 1
0
    def match_does_not_verify(self):

        class BadlyImplementedClass:
            implements(ITestInterface)

        obj = BadlyImplementedClass()
        matcher = Provides(ITestInterface)
        return obj, matcher.match(obj)
Ejemplo n.º 2
0
    def match_does_not_verify(self):

        @implementer(ITestInterface)
        class BadlyImplementedClass:
            pass

        obj = BadlyImplementedClass()
        matcher = Provides(ITestInterface)
        return obj, matcher.match(obj)
Ejemplo n.º 3
0
 def match_does_not_provide(self):
     obj = object()
     matcher = Provides(ITestInterface)
     return obj, matcher.match(obj)
Ejemplo n.º 4
0
 def test_matches(self):
     matcher = Provides(ITestInterface)
     self.assertEqual(None, matcher.match(Implementor()))
Ejemplo n.º 5
0
 def match_does_not_provide(self):
     obj = object()
     matcher = Provides(ITestInterface)
     return obj, matcher.match(obj)
Ejemplo n.º 6
0
 def test_matches(self):
     matcher = Provides(ITestInterface)
     self.assertEqual(None, matcher.match(Implementor()))