예제 #1
0
    def test_path_parsed(self):
        req1 = echoplugin.EchoRequest()
        req1.path = '/something'

        req2 = echoplugin.parseRequest(req1.serialize())

        self.assertEquals('/something', req2.path)
예제 #2
0
    def test_stderr_parsed(self):
        req1 = echoplugin.EchoRequest()
        req1.stderr = True

        req2 = echoplugin.parseRequest(req1.serialize())

        self.assertEquals(True, req2.stderr)
예제 #3
0
    def test_data_parsed(self):
        req1 = echoplugin.EchoRequest()
        req1.data = 'HELLO'

        req2 = echoplugin.parseRequest(req1.serialize())

        self.assertEquals('HELLO', req2.data)
예제 #4
0
    def test_serialise_deserialise_exit_value(self):
        req1 = echoplugin.EchoRequest()
        args = req1.serialize()

        req2 = echoplugin.parseRequest(args)

        self.assertEquals(None, req2.exitCode)
예제 #5
0
    def test_serialise_deserialise_default_values(self):
        req1 = echoplugin.EchoRequest()
        args = req1.serialize()

        req2 = echoplugin.parseRequest(args)

        self.assertTrue(req1 == req2)
예제 #6
0
    def test_default_values(self):
        null_req = echoplugin.EchoRequest()
        req = echoplugin.parseRequest({})

        self.assertTrue(null_req == req)