def test_add(self): basket = RedisSet( {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'}) basket.add('tomato') assert basket == { 'apple', 'orange', 'apple', 'pear', 'orange', 'banana', 'tomato' }
def test_add(self): basket = RedisSet({ 'apple', 'orange', 'apple', 'pear', 'orange', 'banana', }) basket.add('tomato') assert basket == { 'apple', 'orange', 'apple', 'pear', 'orange', 'banana', 'tomato', }
def test_add(self): fruits = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} basket = RedisSet(fruits, redis=self.redis) basket.add('tomato') assert basket == { 'apple', 'orange', 'apple', 'pear', 'orange', 'banana', 'tomato', }