File: imports.py

package info (click to toggle)
pyxmpp 1.0.0-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 8,264 kB
  • ctags: 3,813
  • sloc: python: 10,243; ansic: 1,278; makefile: 119; xml: 73
file content (48 lines) | stat: -rwxr-xr-x 1,799 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import unittest

import pyxmpp.all as pyxmpp
import pyxmpp.jabber.all
import pyxmpp.jabberd.all

class TestImports(unittest.TestCase):
    def test_Stream(self):
        import pyxmpp.stream as m2
        self.failUnless(pyxmpp.Stream is m2.Stream,"Stream not imported correctly")
    def test_Stream_from(self):
        from pyxmpp import Stream as n1
        import pyxmpp.stream as m2
        self.failUnless(n1 is m2.Stream,"Stream not imported correctly")
    def test_JID(self):
        import pyxmpp.jid as m2
        self.failUnless(pyxmpp.JID is m2.JID,"JID not imported correctly")
    def test_JID_from(self):
        from pyxmpp import JID as n1
        import pyxmpp.jid as m2
        self.failUnless(n1 is m2.JID,"JID not imported correctly")
    def test_JabberClient(self):
        import pyxmpp.jabber.client as m2
        self.failUnless(pyxmpp.jabber.Client is m2.JabberClient,"JabberClient not imported correctly")
    def test_JabberClient_from(self):
        from pyxmpp.jabber import Client as n1
        import pyxmpp.jabber.client as m2
        self.failUnless(n1 is m2.JabberClient,"JabberClient not imported correctly")
    def test_Component(self):
        import pyxmpp.jabberd.component as m2
        self.failUnless(pyxmpp.jabberd.Component is m2.Component,"Component not imported correctly")
    def test_Component_from(self):
        from pyxmpp.jabberd import Component as n1
        import pyxmpp.jabberd.component as m2
        self.failUnless(n1 is m2.Component,"Component not imported correctly")

def suite():
     suite = unittest.TestSuite()
     suite.addTest(unittest.makeSuite(TestImports))
     return suite

if __name__ == '__main__':
    unittest.TextTestRunner(verbosity=2).run(suite())

# vi: sts=4 et sw=4