test: define the constants JIDs and profiles as lists
This commit is contained in:
parent
f2503f89ae
commit
db832c1f6b
1 changed files with 53 additions and 57 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue