コード例 #1
0
 def test_init(self):
     hand = [
         (dispatcherEmul('jid'), '2'),
     ]
     self.CV.init(handlers=hand)
     hand.insert(0, (MyVersionQuery, self.CV))
     self.assertEqual(self.CV.dispatcher._handlers, hand)
コード例 #2
0
ファイル: test_stanzas.py プロジェクト: ComradeDOS/twilix
 def test_clean_to(self):
     Validator = stanzas.MyValidator()
     disp = dispatcherEmul('myjid')
     Validator.host = hostEmul(dispatcher=disp)
     Validator.dispatcher = disp
     self.assertEqual(Validator.clean_to(JID('myjid')), disp.myjid)
     self.assertRaises(WrongElement, Validator.clean_to, 'some-jid')
コード例 #3
0
ファイル: test_vcard.py プロジェクト: ComradeDOS/twilix
 def setUp(self):
     self.MyVCardQuery = MyVCardQuery(parent=Iq(type_='result', 
                                      to='somejid'))
     disp = dispatcherEmul('somejid')
     self.vc = VCardQuery(name='John')
     host = hostEmul(myvcard=self.vc, dispatcher=disp)
     self.MyVCardQuery.host = host         
     self.VCard = VCard(disp, self.vc)
コード例 #4
0
ファイル: test_disco.py プロジェクト: malinoff/twilix
 def test_init(self):
     hand=[(dispatcherEmul('jid'), '2'),]
     self.disco.init(handlers=hand)
     test_list=[(disco.VDiscoInfoQuery, self.disco), 
                (disco.VDiscoItemsQuery, self.disco),
                (disco.NotFoundDiscoInfoQuery, self.disco), 
                (disco.NotFoundDiscoItemsQuery, self.disco)]
     test_list.insert(2, hand[0])
     self.assertEqual(self.disco.dispatcher._handlers, test_list)        
コード例 #5
0
ファイル: test_disco.py プロジェクト: rogovvladimir/twilix
 def test_init(self):
     hand = [
         (dispatcherEmul('jid'), '2'),
     ]
     self.disco.init(handlers=hand)
     test_list = [(disco.VDiscoInfoQuery, self.disco),
                  (disco.VDiscoItemsQuery, self.disco),
                  (disco.NotFoundDiscoInfoQuery, self.disco),
                  (disco.NotFoundDiscoItemsQuery, self.disco)]
     test_list.insert(2, hand[0])
     self.assertEqual(self.disco.dispatcher._handlers, test_list)
コード例 #6
0
ファイル: test_version.py プロジェクト: malinoff/twilix
 def test_init(self):
     hand=[(dispatcherEmul('jid'), '2'),]
     self.CV.init(handlers=hand)
     hand.insert(0, (MyVersionQuery, self.CV))
     self.assertEqual(self.CV.dispatcher._handlers, hand)
コード例 #7
0
ファイル: test_version.py プロジェクト: malinoff/twilix
 def setUp(self):
     self.CV = ClientVersion(dispatcher=dispatcherEmul('jid'))
コード例 #8
0
ファイル: test_vcard.py プロジェクト: ComradeDOS/twilix
 def test_init(self):
     hand=[(dispatcherEmul('jid'), '2'),]
     self.VC.init(handlers=hand)
     hand.insert(0, (MyVCardQuery, self.VC))
     self.assertEqual(self.VC.dispatcher._handlers, hand)
コード例 #9
0
ファイル: test_vcard.py プロジェクト: ComradeDOS/twilix
 def setUp(self):
     self.VC = VCard(dispatcher=dispatcherEmul('jid'))
コード例 #10
0
ファイル: test_disco.py プロジェクト: malinoff/twilix
 def setUp(self):
     self.disco = disco.Disco(dispatcherEmul('myjid'))
     self.to = 'somejid'
コード例 #11
0
ファイル: test_roster.py プロジェクト: ComradeDOS/twilix
 def setUp(self):
     self.rost = roster.Roster(dispatcherEmul('jid'), 
                               mypresence='pr')        
コード例 #12
0
ファイル: test_roster.py プロジェクト: rogovvladimir/twilix
 def setUp(self):
     self.rost = roster.Roster(dispatcherEmul('jid'), mypresence='pr')
コード例 #13
0
 def setUp(self):
     self.CV = ClientVersion(dispatcher=dispatcherEmul('jid'))
コード例 #14
0
ファイル: test_disco.py プロジェクト: rogovvladimir/twilix
 def setUp(self):
     self.disco = disco.Disco(dispatcherEmul('myjid'))
     self.to = 'somejid'