예제 #1
0
 def given_I_wrote_the_protocol_header(self):
     connection_info = {
         'username': '******',
         'password': '******',
         'virtual_host': '/'
     }
     self.async_partial(
         open_connection(self.loop, self.transport, self.protocol,
                         self.dispatcher, connection_info))
예제 #2
0
 def given_a_started_connection(self):
     connection_info = {
         'username': '******',
         'password': '******',
         'virtual_host': '/'
     }
     self.async_partial(
         open_connection(self.loop, self.transport, self.protocol,
                         self.dispatcher, connection_info))
     self.server.send_method(
         0, spec.ConnectionStart(0, 9, {}, 'PLAIN AMQPLAIN', 'en_US'))
예제 #3
0
    def given_an_open_connection(self):
        connection_info = ConnectionInfo('guest', 'guest', '/')
        task = asyncio.async(open_connection(self.loop, self.protocol, self.dispatcher, connection_info))
        self.tick()

        start_method = spec.ConnectionStart(0, 9, {}, 'PLAIN AMQPLAIN', 'en_US')
        self.server.send_method(0, start_method)

        tune_method = spec.ConnectionTune(0, 131072, 600)
        self.frame_max = tune_method.frame_max
        self.server.send_method(0, tune_method)

        self.server.send_method(0, spec.ConnectionOpenOK(''))

        self.connection = task.result()
예제 #4
0
    def given_an_open_connection(self):
        connection_info = {'username': '******', 'password': '******', 'virtual_host': '/'}
        task = asyncio.ensure_future(open_connection(self.loop, self.transport, self.protocol, self.dispatcher, connection_info))
        self.tick()

        start_method = spec.ConnectionStart(0, 9, {}, 'PLAIN AMQPLAIN', 'en_US')
        self.server.send_method(0, start_method)

        tune_method = spec.ConnectionTune(0, 131072, 600)
        self.frame_max = tune_method.frame_max
        self.server.send_method(0, tune_method)

        self.server.send_method(0, spec.ConnectionOpenOK(''))

        self.connection = task.result()
예제 #5
0
    def given_an_open_connection(self):
        connection_info = ConnectionInfo('guest', 'guest', '/')
        task = asyncio. async (open_connection(self.loop, self.protocol,
                                               self.dispatcher,
                                               connection_info))
        self.tick()

        start_method = spec.ConnectionStart(0, 9, {}, 'PLAIN AMQPLAIN',
                                            'en_US')
        self.server.send_method(0, start_method)

        tune_method = spec.ConnectionTune(0, 131072, 600)
        self.frame_max = tune_method.frame_max
        self.server.send_method(0, tune_method)

        self.server.send_method(0, spec.ConnectionOpenOK(''))

        self.connection = task.result()
예제 #6
0
    def given_an_open_connection(self):
        task = asyncio.async(open_connection(self.loop, self.protocol, self.dispatcher, self.connection_info))
        self.tick()

        start_frame = asynqp.frames.MethodFrame(0, spec.ConnectionStart(0, 9, {}, 'PLAIN AMQPLAIN', 'en_US'))
        self.dispatcher.dispatch(start_frame)
        self.tick()

        self.frame_max = 131072
        tune_frame = asynqp.frames.MethodFrame(0, spec.ConnectionTune(0, self.frame_max, 600))
        self.dispatcher.dispatch(tune_frame)
        self.tick()

        open_ok_frame = asynqp.frames.MethodFrame(0, spec.ConnectionOpenOK(''))
        self.dispatcher.dispatch(open_ok_frame)
        self.tick()

        self.protocol.reset_mock()
        self.connection = task.result()
예제 #7
0
    def given_an_open_connection(self):
        task = asyncio. async (open_connection(self.loop, self.protocol,
                                               self.dispatcher,
                                               self.connection_info))
        self.tick()

        start_frame = asynqp.frames.MethodFrame(
            0, spec.ConnectionStart(0, 9, {}, 'PLAIN AMQPLAIN', 'en_US'))
        self.dispatcher.dispatch(start_frame)
        self.tick()

        self.frame_max = 131072
        tune_frame = asynqp.frames.MethodFrame(
            0, spec.ConnectionTune(0, self.frame_max, 600))
        self.dispatcher.dispatch(tune_frame)
        self.tick()

        open_ok_frame = asynqp.frames.MethodFrame(0, spec.ConnectionOpenOK(''))
        self.dispatcher.dispatch(open_ok_frame)
        self.tick()

        self.protocol.reset_mock()
        self.connection = task.result()
예제 #8
0
 def given_I_wrote_the_protocol_header(self):
     connection_info = {'username': '******', 'password': '******', 'virtual_host': '/'}
     self.async_partial(open_connection(self.loop, self.transport, self.protocol, self.dispatcher, connection_info))
예제 #9
0
 def given_a_started_connection(self):
     connection_info = {'username': '******', 'password': '******', 'virtual_host': '/'}
     self.async_partial(open_connection(self.loop, self.transport, self.protocol, self.dispatcher, connection_info))
     self.server.send_method(0, spec.ConnectionStart(0, 9, {}, 'PLAIN AMQPLAIN', 'en_US'))
예제 #10
0
 def given_a_started_connection(self):
     connection_info = ConnectionInfo('guest', 'guest', '/')
     self.async_partial(open_connection(self.loop, self.protocol, self.dispatcher, connection_info))
     self.server.send_method(0, spec.ConnectionStart(0, 9, {}, 'PLAIN AMQPLAIN', 'en_US'))
예제 #11
0
 def given_I_wrote_the_protocol_header(self):
     connection_info = ConnectionInfo('guest', 'guest', '/')
     self.async_partial(open_connection(self.loop, self.protocol, self.dispatcher, connection_info))
예제 #12
0
 def given_a_started_connection(self):
     connection_info = ConnectionInfo('guest', 'guest', '/')
     self.async_partial(open_connection(self.loop, self.protocol, self.dispatcher, connection_info))
     self.server.send_method(0, spec.ConnectionStart(0, 9, {}, 'PLAIN AMQPLAIN', 'en_US'))
예제 #13
0
 def given_I_wrote_the_protocol_header(self):
     connection_info = ConnectionInfo('guest', 'guest', '/')
     self.async_partial(open_connection(self.loop, self.protocol, self.dispatcher, connection_info))