def test_lookup(self):

        fn_pairs = {
            'cdn1': ('artwork/1/header.jpg',
                     'artwork/2/header.jpg',
                     'artwork/3/header.jpg',
                     'artwork/6/header.jpg', ),

            'cdn2': ('artwork/4/header.jpg',
                     'artwork/5/header.jpg', )
        }

        self.ring.add_node('cdn1')
        self.ring.add_node('cdn2')

        for cdn, fns in fn_pairs.items():
            for fn in fns:
                node = self.ring.lookup(fn)
                self.assertEqual(cdn, node)
Ensures node lookup is working
dataset/ETHPy150Open mattdennewitz/hash-ring-ctypes/tests.py/TestHashRing.test_lookup