def testAddTargetAndGetAllTargets(self): hashSpace = Flexihash() hashSpace \ .addTarget('t-a') \ .addTarget('t-b') \ .addTarget('t-c') self.assertEqual(hashSpace.getAllTargets(), ['t-a', 't-b', 't-c'])
def testAddTargetAndGetAllTargets(self): hashSpace = Flexihash() hashSpace \ .addTarget('t-a') \ .addTarget('t-b') \ .addTarget('t-c') self.assertEqual(hashSpace.getAllTargets(), ['t-a', 't-b', 't-c'])
def testAddTargetsAndGetAllTargets(self): targets = ['t-a', 't-b', 't-c'] hashSpace = Flexihash() hashSpace.addTargets(targets) self.assertEqual(hashSpace.getAllTargets(), targets)
def testGetAllTargetsEmpty(self): hashSpace = Flexihash() self.assertEqual(hashSpace.getAllTargets(), [])
def testAddTargetsAndGetAllTargets(self): targets = ['t-a', 't-b', 't-c'] hashSpace = Flexihash() hashSpace.addTargets(targets) self.assertEqual(hashSpace.getAllTargets(), targets)
def testGetAllTargetsEmpty(self): hashSpace = Flexihash() self.assertEqual(hashSpace.getAllTargets(), [])