Example #1
0
    def test_close_with_args(self):
        c = Channel(None, None, {})
        expect(mock(c, 'channel').close).args(1, 'two', 3, 4)
        expect(c.channel.close).args(1, 'two', 3, 4)

        c.close(1, 'two', 3, 4)
        c.close(reply_code=1, reply_text='two', class_id=3, method_id=4)
Example #2
0
    def test_close_with_args(self):
        c = Channel(None, None, {})
        expect(mock(c, 'channel').close).args(1, 'two', 3, 4)
        expect(c.channel.close).args(1, 'two', 3, 4)

        c.close(1, 'two', 3, 4)
        c.close(reply_code=1, reply_text='two', class_id=3, method_id=4)
Example #3
0
 def test_close_when_channel_attr_cleared(self):
     c = Channel(None, None, {})
     assert_false(hasattr(c, 'channel'))
     c.close()
Example #4
0
 def test_close_with_no_args(self):
     c = Channel(None, None, {})
     expect(mock(c, 'channel').close).args(0, '', 0, 0)
     c.close()
Example #5
0
 def test_close_when_channel_attr_cleared(self):
     c = Channel(None, None, {})
     assert_false(hasattr(c, 'channel'))
     c.close()
Example #6
0
 def test_close_with_no_args(self):
     c = Channel(None, None, {})
     expect(mock(c, 'channel').close).args(0, '', 0, 0)
     c.close()
Example #7
0
 def test_close_with_no_args(self):
   c = Channel(None,None)
   expect( c.channel.close ).args( 0, '', 0, 0 )
   c.close()
Example #8
0
 def test_close_with_no_args(self):
     c = Channel(None, None)
     expect(c.channel.close).args(0, '', 0, 0)
     c.close()