From 7b39dcbf65ca160c4e820fd936b5c411d3790138 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Mon, 5 Aug 2019 11:59:01 -0400
Subject: [PATCH] Fix the Provides test

---
 src/_secureaccesstokenauthorizer/tests/matchers.py      | 2 +-
 src/_secureaccesstokenauthorizer/tests/test_matchers.py | 9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/_secureaccesstokenauthorizer/tests/matchers.py b/src/_secureaccesstokenauthorizer/tests/matchers.py
index c36c507..c54c990 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 13b5041..ab95ee3 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)),
         )
 
-- 
GitLab