comparison src/test/helpers.py @ 591:65821b3fa7ab

Fix pep8 support in src/test.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 18 Jan 2013 17:55:35 +0100
parents 952322b1d490
children 84a6e83157c2
comparison
equal deleted inserted replaced
590:56531f9e9ac7 591:65821b3fa7ab
24 24
25 TEST_JID_STR = u"test@example.org/SàT" 25 TEST_JID_STR = u"test@example.org/SàT"
26 TEST_JID = JID(u"test@example.org/SàT") 26 TEST_JID = JID(u"test@example.org/SàT")
27 TEST_PROFILE = 'test_profile' 27 TEST_PROFILE = 'test_profile'
28 28
29
29 class DifferentArgsException(Exception): 30 class DifferentArgsException(Exception):
30 pass 31 pass
32
31 33
32 class FakeSAT(object): 34 class FakeSAT(object):
33 """Class to simulate a SAT instance""" 35 """Class to simulate a SAT instance"""
34 36
35 def __init__(self): 37 def __init__(self):
73 pass 75 pass
74 76
75 def delWaitingSub(self, contact_jid, profile_key): 77 def delWaitingSub(self, contact_jid, profile_key):
76 pass 78 pass
77 79
80
78 class FakeTriggerManager(object): 81 class FakeTriggerManager(object):
79 82
80 def add(self, point_name, callback): 83 def add(self, point_name, callback):
81 pass 84 pass
82 85
83 def point(self, point_name, *args, **kwargs): 86 def point(self, point_name, *args, **kwargs):
84 """We always return true to continue the action""" 87 """We always return true to continue the action"""
85 return True 88 return True
86 89
90
87 class FakeParent(object): 91 class FakeParent(object):
88 def __init__(self): 92 def __init__(self):
89 self.profile = 'test_profile' 93 self.profile = 'test_profile'
90 self.jid = TEST_JID 94 self.jid = TEST_JID
91 95
96
92 def _(text): 97 def _(text):
93 return text 98 return text
94 99
95 __builtin__.__dict__['_'] = _ 100 __builtin__.__dict__['_'] = _