import py
import autopath
from httpmp2.command import Command

class TestCommand(object):
    def test_command(self):
        c = Command('foo', 'bar')
        serialized = c.more()
        assert serialized == ':foo:bar\r\n'
        more = c.more()
        assert more == ''

        c = Command('foo', 1, 'bar')
        serialized = c.more()
        assert serialized == 'bar:foo:1\r\n'



