comparison src/test/helpers.py @ 1624:7e749e8eefd0

core: fixed launchAction: - getClient now raise a NotFound error if client is not available - errors ConnectedProfileError, NotConnectedProfileError anf ProfileKeyUnknownError renamed for consistency (all profile error must prefixed by Profile) - launchAction fixed, the case where client is not available is handled - kept actions are actuall1y removed on launchAction
author Goffi <goffi@goffi.org>
date Wed, 18 Nov 2015 11:06:24 +0100
parents 979210da778a
children d17772b0fe22
comparison
equal deleted inserted replaced
1623:ec48b35309dc 1624:7e749e8eefd0
122 def getClient(self, profile_key): 122 def getClient(self, profile_key):
123 """Convenient method to get client from profile key 123 """Convenient method to get client from profile key
124 @return: client or None if it doesn't exist""" 124 @return: client or None if it doesn't exist"""
125 profile = self.memory.getProfileName(profile_key) 125 profile = self.memory.getProfileName(profile_key)
126 if not profile: 126 if not profile:
127 raise exceptions.ProfileKeyUnknownError 127 raise exceptions.ProfileKeyUnknown
128 if profile not in self.profiles: 128 if profile not in self.profiles:
129 self.profiles[profile] = FakeClient(self, profile) 129 self.profiles[profile] = FakeClient(self, profile)
130 return self.profiles[profile] 130 return self.profiles[profile]
131 131
132 def getJidNStream(self, profile_key): 132 def getJidNStream(self, profile_key):