diff src/test/helpers.py @ 792:2136be5a44a8

test: define the constants JIDs and profiles as lists
author souliane <souliane@mailoo.org>
date Thu, 09 Jan 2014 11:18:33 +0100
parents 0cb423500fbb
children 52c4b755aba6
line wrap: on
line diff
--- a/src/test/helpers.py	Fri Jan 10 18:07:36 2014 +0100
+++ b/src/test/helpers.py	Thu Jan 09 11:18:33 2014 +0100
@@ -104,7 +104,7 @@
         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 @@
 
     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 @@
     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 @@
     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):