def test_get_services(self):

        class IFoo(Interface):
            pass

        @provides(IFoo)
        class Foo(HasTraits):
            pass

        # Register two services.
        foo = Foo()
        self.service_registry.register_service(IFoo, foo)

        foo = Foo()
        self.service_registry.register_service(IFoo, foo)

        # Look it up again.
        services = self.service_registry.get_services(IFoo)
        self.assertEqual(2, len(services))

        class IBar(Interface):
            pass

        # Lookup a non-existent service.
        services = self.service_registry.get_services(IBar)
        self.assertEqual([], services)

        return
get services
dataset/ETHPy150Open enthought/envisage/envisage/tests/service_registry_test_case.py/ServiceRegistryTestCase.test_get_services