Пример #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)
Пример #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)
Пример #3
0
 def test_close_when_channel_attr_cleared(self):
     c = Channel(None, None, {})
     assert_false(hasattr(c, 'channel'))
     c.close()
Пример #4
0
 def test_close_with_no_args(self):
     c = Channel(None, None, {})
     expect(mock(c, 'channel').close).args(0, '', 0, 0)
     c.close()
Пример #5
0
 def test_close_when_channel_attr_cleared(self):
     c = Channel(None, None, {})
     assert_false(hasattr(c, 'channel'))
     c.close()
Пример #6
0
 def test_close_with_no_args(self):
     c = Channel(None, None, {})
     expect(mock(c, 'channel').close).args(0, '', 0, 0)
     c.close()
Пример #7
0
 def test_close_with_no_args(self):
   c = Channel(None,None)
   expect( c.channel.close ).args( 0, '', 0, 0 )
   c.close()
Пример #8
0
 def test_close_with_no_args(self):
     c = Channel(None, None)
     expect(c.channel.close).args(0, '', 0, 0)
     c.close()