def _duplicateAdapterForClassOrInterface(self, original):
        """
        Verify that L{components.registerAdapter} raises L{ValueError} if the
        from-type/interface and to-interface pair is not unique.
        """
        firstAdapter = lambda o: False
        secondAdapter = lambda o: True
        components.registerAdapter(firstAdapter, original, ITest)
        self.assertRaises(
            ValueError,
            components.registerAdapter,
            secondAdapter, original, ITest)
        # Make sure that the original adapter is still around as well
        self.assertIs(
            components.getAdapterFactory(original, ITest, None),
            firstAdapter)

        Verify that L{components.registerAdapter} raises L{ValueError} if the
        from-type/interface and to-interface pair is not unique.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/test/test_components.py