Esempio n. 1
0
    def match_does_not_verify(self):

        class BadlyImplementedClass:
            implements(ITestInterface)

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

        @implementer(ITestInterface)
        class BadlyImplementedClass:
            pass

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