Example #1
0
def test_gets_many_some_found():
    client = Client(None)
    client.sock = MockSocket(['VALUE key1 0 6 11\r\nvalue1\r\nEND\r\n'])
    result = client.gets_many(['key1', 'key2'])
    tools.assert_equal(result, {'key1': ('value1', '11')})
Example #2
0
def test_gets_many_some_found():
    client = Client(None)
    client.sock = MockSocket(['VALUE key1 0 6 11\r\nvalue1\r\nEND\r\n'])
    result = client.gets_many(['key1', 'key2'])
    tools.assert_equal(result, {'key1': ('value1', '11')})
Example #3
0
def test_gets_many_none_found():
    client = Client(None)
    client.sock = MockSocket(['END\r\n'])
    result = client.gets_many(['key1', 'key2'])
    tools.assert_equal(result, {})
Example #4
0
def test_gets_many_none_found():
    client = Client(None)
    client.sock = MockSocket(['END\r\n'])
    result = client.gets_many(['key1', 'key2'])
    tools.assert_equal(result, {})