Example #1
0
def testParseArrayEmptyArg():
    parser = Parser()
    output = parser.decodeArray(b'*1\r\n$4\r\nping\r\n')
    expected = Ping('')
    cmdOutput = parser.parseCommands(output)
    assert cmdOutput == expected
Example #2
0
def testParseCommands():
    parser = Parser()
    expected = Ping('foobar')
    output = parser.decodeArray(b'*2\r\n$4\r\nping\r\n$6\r\nfoobar\r\n')
    o = parser.parseCommands(output)
    assert o == expected