#NEWLINE# def test_getAllUtilitiesRegisteredFor_hit( self ) : #NEWLINE# #INDENT# from zope.interface.declarations import InterfaceClass #NEWLINE# from zope.interface._compat import _u #NEWLINE# class IFoo ( InterfaceClass ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# ifoo = IFoo ( 'IFoo' ) #NEWLINE# _name1 = _u ( 'name1' ) #NEWLINE# _name2 = _u ( 'name2' ) #NEWLINE# _to_reg = object ( ) #NEWLINE# comp = self . _makeOne ( ) #NEWLINE# comp . registerUtility ( _to_reg , ifoo , name = _name1 ) #NEWLINE# comp . registerUtility ( self , ifoo , name = _name2 ) #NEWLINE# self . assertEqual ( list ( comp . getAllUtilitiesRegisteredFor ( ifoo ) ) , [ _to_reg ] )