Ejemplo n.º 1
0
    def test_channel0_unblocked(self):
        channel = Channel0(self.connection)

        channel.on_frame(Connection.Blocked())

        self.assertTrue(channel.is_blocked)

        channel.on_frame(Connection.Unblocked())

        self.assertFalse(channel.is_blocked)
        self.assertEqual(self.get_last_log(),
                         'Connection is blocked by remote server: ')
Ejemplo n.º 2
0
    def test_channel0_unblocked(self):
        connection = amqpstorm.Connection('localhost',
                                          'guest',
                                          'guest',
                                          lazy=True)
        channel = Channel0(connection)

        channel.on_frame(Connection.Blocked())

        self.assertTrue(channel.is_blocked)

        channel.on_frame(Connection.Unblocked())

        self.assertFalse(channel.is_blocked)
        self.assertEqual(self.logging_handler.messages['info'][0],
                         'Connection is no longer blocked by remote server')