Skip to content
Snippets Groups Projects
Commit 7b39dcbf authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Fix the Provides test

parent 3a8ee652
No related branches found
No related tags found
1 merge request!13Add a web interface to the storage plugin for initiating PRN redemption
...@@ -28,7 +28,7 @@ from testtools.matchers import ( ...@@ -28,7 +28,7 @@ from testtools.matchers import (
@attr.s @attr.s
class Provides(object): 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() interfaces = attr.ib()
......
...@@ -43,12 +43,13 @@ class IY(Interface): ...@@ -43,12 +43,13 @@ class IY(Interface):
pass pass
@implementer(IX) @implementer(IX, IY)
class X(object): class X(object):
pass pass
class Z(object): @implementer(IY)
class Y(object):
pass pass
...@@ -58,7 +59,7 @@ class ProvidesTests(TestCase): ...@@ -58,7 +59,7 @@ class ProvidesTests(TestCase):
""" """
def test_match(self): 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. the configured interfaces.
""" """
self.assertThat( self.assertThat(
...@@ -72,7 +73,7 @@ class ProvidesTests(TestCase): ...@@ -72,7 +73,7 @@ class ProvidesTests(TestCase):
none of the configured interfaces. none of the configured interfaces.
""" """
self.assertThat( self.assertThat(
Provides([IX, IY]).match(Z()), Provides([IX, IY]).match(Y()),
Not(Is(None)), Not(Is(None)),
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment