Mercurial > libervia-backend
comparison src/test/helpers.py @ 647:63b6e684bbfa
tests: Use of FailTest for DifferentArgsException instead of Exception, so the test fail instead of raising en error.
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 26 Sep 2013 17:32:24 +0200 |
parents | 84a6e83157c2 |
children | e20c823f23e2 |
comparison
equal
deleted
inserted
replaced
646:f7804c52c754 | 647:63b6e684bbfa |
---|---|
17 # You should have received a copy of the GNU Affero General Public License | 17 # You should have received a copy of the GNU Affero General Public License |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
20 import __builtin__ | 20 import __builtin__ |
21 from twisted.words.protocols.jabber.jid import JID | 21 from twisted.words.protocols.jabber.jid import JID |
22 from twisted.trial.unittest import FailTest | |
22 | 23 |
23 TEST_JID_STR = u"test@example.org/SàT" | 24 TEST_JID_STR = u"test@example.org/SàT" |
24 TEST_JID = JID(u"test@example.org/SàT") | 25 TEST_JID = JID(u"test@example.org/SàT") |
25 TEST_PROFILE = 'test_profile' | 26 TEST_PROFILE = 'test_profile' |
26 | 27 |
27 | 28 |
28 class DifferentArgsException(Exception): | 29 class DifferentArgsException(FailTest): |
29 pass | 30 pass |
30 | 31 |
31 | 32 |
32 class FakeSAT(object): | 33 class FakeSAT(object): |
33 """Class to simulate a SAT instance""" | 34 """Class to simulate a SAT instance""" |