tests: tests fixes

This commit is contained in:
Goffi 2014-03-21 16:19:46 +01:00
commit 2a40da1664

View file

@ -22,8 +22,8 @@
from constants import Const
from sat.test import helpers
from sat.core.constants import Const as C
from sat.plugins import plugin_xep_0085 as plugin
from sat.memory.memory import NO_SECURITY_LIMIT
from copy import deepcopy
from twisted.internet import defer
from wokkel.generic import parseXml
@ -38,7 +38,7 @@ class XEP_0085Test(helpers.SatTestCase):
def test_messageReceived(self):
self.host.memory.init()
self.host.memory.setParam(plugin.PARAM_NAME, True, plugin.PARAM_KEY, NO_SECURITY_LIMIT, Const.PROFILE[0])
self.host.memory.setParam(plugin.PARAM_NAME, True, plugin.PARAM_KEY, C.NO_SECURITY_LIMIT, Const.PROFILE[0])
for state in plugin.CHAT_STATES:
xml = u"""
<message type="chat" from="%s" to="%s" id="test_1">
@ -55,7 +55,7 @@ class XEP_0085Test(helpers.SatTestCase):
def test_sendMessageTrigger(self):
self.host.memory.init()
self.host.memory.setParam(plugin.PARAM_NAME, True, plugin.PARAM_KEY, NO_SECURITY_LIMIT, Const.PROFILE[0])
self.host.memory.setParam(plugin.PARAM_NAME, True, plugin.PARAM_KEY, C.NO_SECURITY_LIMIT, Const.PROFILE[0])
for state in plugin.CHAT_STATES:
mess_data = {"to": Const.JID[0],
"type": "chat",