Make tests run again.

Missed to reflect API changes in the tests.
This commit is contained in:
Stephan Erb 2009-12-05 22:26:48 +01:00
parent 228678d6e8
commit 79b226d3f8
5 changed files with 9 additions and 6 deletions

View File

@ -28,7 +28,7 @@ class TestStatusChange(unittest.TestCase):
def setUp(self): def setUp(self):
gajim.connections = {} gajim.connections = {}
gajim.contacts = contacts_module.Contacts() gajim.contacts = contacts_module.LegacyContactsAPI()
gajim.interface.roster = roster_window.RosterWindow() gajim.interface.roster = roster_window.RosterWindow()
for acc in contacts: for acc in contacts:

View File

@ -27,7 +27,7 @@ class TestRosterWindow(unittest.TestCase):
# Add after creating RosterWindow # Add after creating RosterWindow
# We want to test the filling explicitly # We want to test the filling explicitly
gajim.contacts = contacts_module.Contacts() gajim.contacts = contacts_module.LegacyContactsAPI()
gajim.connections = {} gajim.connections = {}
self.roster = roster_window.RosterWindow() self.roster = roster_window.RosterWindow()

View File

@ -39,9 +39,9 @@ modules = ( 'unit.test_xmpp_dispatcher_nb',
'unit.test_xmpp_transports_nb', 'unit.test_xmpp_transports_nb',
'unit.test_caps', 'unit.test_caps',
'unit.test_contacts', 'unit.test_contacts',
'unit.test_gui_interface',
'unit.test_sessions', 'unit.test_sessions',
'unit.test_account', 'unit.test_account',
'unit.test_gui_interface',
) )
#modules = () #modules = ()

View File

@ -6,7 +6,7 @@ import unittest
import lib import lib
lib.setup_env() lib.setup_env()
from common.contacts import CommonContact, Contact, GC_Contact, Contacts from common.contacts import CommonContact, Contact, GC_Contact, LegacyContactsAPI
from common.xmpp import NS_MUC from common.xmpp import NS_MUC
from common import caps from common import caps
@ -68,7 +68,7 @@ class TestGC_Contact(TestCommonContact):
class TestContacts(unittest.TestCase): class TestContacts(unittest.TestCase):
def setUp(self): def setUp(self):
self.contacts = Contacts() self.contacts = LegacyContactsAPI()
def test_create_add_get_contact(self): def test_create_add_get_contact(self):
jid = 'test@gajim.org' jid = 'test@gajim.org'

View File

@ -1,3 +1,6 @@
'''
Some diverse tests covering functionality in the GUI Interface class.
'''
import unittest import unittest
import lib import lib
@ -13,7 +16,7 @@ gajim.logger = MockLogger()
from gui_interface import Interface from gui_interface import Interface
class Test(unittest.TestCase): class TestInterface(unittest.TestCase):
def test_instantiation(self): def test_instantiation(self):
''' Test that we can proper initialize and do not fail on globals ''' ''' Test that we can proper initialize and do not fail on globals '''