diff --git a/src/_secureaccesstokenauthorizer/tests/matchers.py b/src/_secureaccesstokenauthorizer/tests/matchers.py index c36c50796f5ebabf6da188bb2a939f4906df55c5..c54c99067b80438f119edbc9521b9d1e84d87499 100644 --- a/src/_secureaccesstokenauthorizer/tests/matchers.py +++ b/src/_secureaccesstokenauthorizer/tests/matchers.py @@ -28,7 +28,7 @@ from testtools.matchers import ( @attr.s class Provides(object): """ - Match objects that provide one or more Zope Interface interfaces. + Match objects that provide all of a list of Zope Interface interfaces. """ interfaces = attr.ib() diff --git a/src/_secureaccesstokenauthorizer/tests/test_matchers.py b/src/_secureaccesstokenauthorizer/tests/test_matchers.py index 13b5041a5486f1911b64ef61381d5828e473b0c7..ab95ee31b6a7f402406f40ca31dccd443a9c9d56 100644 --- a/src/_secureaccesstokenauthorizer/tests/test_matchers.py +++ b/src/_secureaccesstokenauthorizer/tests/test_matchers.py @@ -43,12 +43,13 @@ class IY(Interface): pass -@implementer(IX) +@implementer(IX, IY) class X(object): pass -class Z(object): +@implementer(IY) +class Y(object): pass @@ -58,7 +59,7 @@ class ProvidesTests(TestCase): """ def test_match(self): """ - ``Provides.match`` returns ``None`` when the given object provides any of + ``Provides.match`` returns ``None`` when the given object provides all of the configured interfaces. """ self.assertThat( @@ -72,7 +73,7 @@ class ProvidesTests(TestCase): none of the configured interfaces. """ self.assertThat( - Provides([IX, IY]).match(Z()), + Provides([IX, IY]).match(Y()), Not(Is(None)), )