Remove trailing whitespaces.
This commit is contained in:
parent
310e2cc347
commit
27b3592e16
2 changed files with 899 additions and 899 deletions
|
|
@ -22,8 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
import __builtin__
|
||||
from twisted.words.protocols.jabber.jid import JID
|
||||
|
||||
TEST_JID_STR = u"test@example.org/SàT"
|
||||
TEST_JID = JID(u"test@example.org/SàT")
|
||||
TEST_JID_STR = u"test@example.org/SàT"
|
||||
TEST_JID = JID(u"test@example.org/SàT")
|
||||
TEST_PROFILE = 'test_profile'
|
||||
|
||||
class DifferentArgsException(Exception):
|
||||
|
|
@ -35,7 +35,7 @@ class FakeSAT(object):
|
|||
def __init__(self):
|
||||
self.bridge = FakeBridge()
|
||||
self.memory = FakeMemory()
|
||||
self.trigger = FakeTriggerManager()
|
||||
self.trigger = FakeTriggerManager()
|
||||
|
||||
|
||||
class FakeBridge(object):
|
||||
|
|
@ -50,7 +50,7 @@ class FakeBridge(object):
|
|||
print "kwargs\n------\n%s (sent)\n%s (wanted)" % (kwargs, check_kwargs)
|
||||
print "--------------------\n\n"
|
||||
raise DifferentArgsException
|
||||
|
||||
|
||||
setattr(self, name, checkCall)
|
||||
|
||||
|
||||
|
|
@ -62,16 +62,16 @@ class FakeMemory(object):
|
|||
|
||||
def addToHistory(self, from_jid, to_jid, message, _type='chat', timestamp=None, profile=None):
|
||||
pass
|
||||
|
||||
|
||||
def addContact(self, contact_jid, attributes, groups, profile_key='@DEFAULT@'):
|
||||
pass
|
||||
|
||||
|
||||
def setPresenceStatus(self, contact_jid, show, priority, statuses, profile_key='@DEFAULT@'):
|
||||
pass
|
||||
|
||||
|
||||
def addWaitingSub(self, type, contact_jid, profile_key):
|
||||
pass
|
||||
|
||||
|
||||
def delWaitingSub(self, contact_jid, profile_key):
|
||||
pass
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ class FakeTriggerManager(object):
|
|||
|
||||
def add(self, point_name, callback):
|
||||
pass
|
||||
|
||||
|
||||
def point(self, point_name, *args, **kwargs):
|
||||
"""We always return true to continue the action"""
|
||||
return True
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ class SatXMPPClientTest(unittest.TestCase):
|
|||
|
||||
def setUp(self):
|
||||
self.host = helpers.FakeSAT()
|
||||
self.client = xmpp.SatXMPPClient(self.host, "test_profile", JID("test@example.org"), "test")
|
||||
|
||||
self.client = xmpp.SatXMPPClient(self.host, "test_profile", JID("test@example.org"), "test")
|
||||
|
||||
def test_init(self):
|
||||
"""Check that init values are correctly initialised"""
|
||||
self.assertEqual(self.client.profile, "test_profile")
|
||||
|
|
@ -59,7 +59,7 @@ class SatMessageProtocolTest(unittest.TestCase):
|
|||
stanza = parseXml(xml)
|
||||
self.host.bridge.expectCall("newMessage", "sender@example.net/house", "test", "chat", u"test@example.org/SàT", profile="test_profile")
|
||||
self.message.onMessage(stanza)
|
||||
|
||||
|
||||
class SatRosterProtocolTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
|
|
@ -99,16 +99,16 @@ class SatPresenceProtocolTest(unittest.TestCase):
|
|||
def test_subscribedReceived(self):
|
||||
self.host.bridge.expectCall("subscribe", "subscribed", helpers.TEST_JID.userhost(), helpers.TEST_PROFILE)
|
||||
self.presence.subscribedReceived(helpers.TEST_JID)
|
||||
|
||||
|
||||
def test_unsubscribedReceived(self):
|
||||
self.host.bridge.expectCall("subscribe", "unsubscribed", helpers.TEST_JID.userhost(), helpers.TEST_PROFILE)
|
||||
self.presence.unsubscribedReceived(helpers.TEST_JID)
|
||||
|
||||
|
||||
def test_subscribeReceived(self):
|
||||
self.host.bridge.expectCall("subscribe", "subscribe", helpers.TEST_JID.userhost(), helpers.TEST_PROFILE)
|
||||
self.presence.subscribeReceived(helpers.TEST_JID)
|
||||
|
||||
|
||||
def test_unsubscribeReceived(self):
|
||||
self.host.bridge.expectCall("subscribe", "unsubscribe", helpers.TEST_JID.userhost(), helpers.TEST_PROFILE)
|
||||
self.presence.unsubscribeReceived(helpers.TEST_JID)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue