def test_basic_nack(self): def on_write(channel, frame): self.assertEqual(channel, 9) self.assertIsInstance(frame, specification.Basic.Nack) connection = FakeConnection(on_write=on_write) channel = Channel(9, connection, 1) channel.set_state(Channel.OPEN) basic = Basic(channel) self.assertEqual(basic.nack(), None)