'Verify that a call similar to basicLiteralEmit\'s is handled properly with
high-level quoting and passing to Python methods, and that argument
names are correctly handled.'

def test_basicStructuredEmit(self):

    L = []
    class StructuredHello(amp.AMP, ):
        def h(self, *a, **k):
            L.append((a, k))
            return dict(hello='aaa')
        Hello.responder(h)
    (c, s, p) = connectedServerAndClient(ServerClass=StructuredHello)
    c.callRemote(Hello, hello='hello    test', mixedCase='mixed    case    arg    test', dash_arg='x', underscore_arg='y').addCallback(L.append)
    p.flush()
    self.assertEqual(len(L), 2)
    self.assertEqual(L[0], ((), dict(hello='hello    test', mixedCase='mixed    case    arg    test', dash_arg='x', underscore_arg='y', From=s.transport.getPeer(), Print=None, optional=None)))
    self.assertEqual(L[1], dict(Print=None, hello='aaa'))
