'This is implemented as a utility method, because only some of the backends
implement culling. The culling algorithm also varies slightly, so the final
number of entries will vary between backends'

def perform_cull_test(self, initial_count, final_count):

    for i in range(1, initial_count):
        self.cache.set((u'cull%d' % i), u'value', 1000)
    count = 0
    for i in range(1, initial_count):
        if self.cache.has_key((u'cull%d' % i)):
            count = (count + 1)
    self.assertEqual(count, final_count)
