コード例 #1
0
ファイル: test_tyrant_cloud.py プロジェクト: Plurk/LightCloud
def test_list():
    lightcloud.list_varnish('hello')

    lightcloud.list_add('hello', ['1', '2', '3'])
    lightcloud.list_add('hello', ['4'])
    assert lightcloud.list_get('hello') == ['4', '1', '2', '3']

    lightcloud.list_remove('hello', ['3'])
    assert lightcloud.list_get('hello') == ['4', '1', '2']
コード例 #2
0
def test_list():
    lightcloud.list_varnish('hello')

    lightcloud.list_add('hello', ['1', '2', '3'])
    lightcloud.list_add('hello', ['4'])
    assert lightcloud.list_get('hello') == ['4', '1', '2', '3']

    lightcloud.list_remove('hello', ['3'])
    assert lightcloud.list_get('hello') == ['4', '1', '2']
コード例 #3
0
ファイル: StorageManager.py プロジェクト: ahussein/FSTags
 def remove_one(self, key, value):
     """
     Removes one of the value from the values list of a key
     
     @param key: a key in the store
     @param value: value to remove from the values list
     
     @return: True if the key/value removed successfully, False otherwise
     """
     return lightcloud.list_remove(key, value) == 'ok'
コード例 #4
0
 def remove_one(self, key, value):
     """
     Removes one of the value from the values list of a key
     
     @param key: a key in the store
     @param value: value to remove from the values list
     
     @return: True if the key/value removed successfully, False otherwise
     """
     return lightcloud.list_remove(key, value) == 'ok'