test: define the constants JIDs and profiles as lists

This commit is contained in:
souliane 2014-01-09 11:18:33 +01:00
commit db832c1f6b

View file

@ -104,7 +104,7 @@ class FakeSAT(object):
return defer.succeed(jid_ if self.memory.hasServerFeature(feature, jid_, profile_key) else None)
def getClientHostJid(self, profile_key):
return JID(Const.TEST_JID.host)
return JID(Const.JID[0].host)
class FakeBridge(object):
@ -149,7 +149,7 @@ class FakeParams(Params):
def getProfileName(self, profile_key, return_profile_keys=False):
if profile_key == '@DEFAULT@':
return Const.TEST_PROFILE
return Const.PROFILE[0]
elif profile_key == '@NONE@':
raise exceptions.ProfileNotSetError
else:
@ -222,7 +222,7 @@ class FakeRosterProtocol(SatRosterProtocol):
def __init__(self, host, parent):
SatRosterProtocol.__init__(self, host)
self.parent = parent
self.addItem(Const.TEST_JID)
self.addItem(Const.JID[0])
def addItem(self, jid, *args, **kwargs):
if not args and not kwargs:
@ -241,7 +241,7 @@ class FakeClient(object):
def __init__(self, host):
self.host = host
self.profile = 'test_profile'
self.jid = Const.TEST_JID
self.jid = Const.JID[0]
self.roster = FakeRosterProtocol(host, self)
def send(self, obj):