comparison src/test/helpers.py @ 998:f5761534e0f3

tests: fixed log init in helpers (log init must be done before any call to a log method)
author Goffi <goffi@goffi.org>
date Wed, 23 Apr 2014 12:01:59 +0200
parents b3f383ab39da
children c37a24922f27
comparison
equal deleted inserted replaced
997:b3f383ab39da 998:f5761534e0f3
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU Affero General Public License for more details. 15 # GNU Affero General Public License for more details.
16 16
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
20
21 ## logging configuration for tests ##
22 from sat.core import log
23 log.satConfigure()
19 24
20 from sat.core import exceptions 25 from sat.core import exceptions
21 from constants import Const 26 from constants import Const
22 from wokkel.xmppim import RosterItem 27 from wokkel.xmppim import RosterItem
23 from sat.core.xmpp import SatRosterProtocol 28 from sat.core.xmpp import SatRosterProtocol
27 from twisted.internet import defer 32 from twisted.internet import defer
28 from twisted.words.protocols.jabber.jid import JID 33 from twisted.words.protocols.jabber.jid import JID
29 from xml.etree import cElementTree as etree 34 from xml.etree import cElementTree as etree
30 from collections import Counter 35 from collections import Counter
31 import re 36 import re
32
33 ## logging configuration for tests ##
34 from sat.core import log
35 log.satConfigure()
36 37
37 38
38 def b2s(value): 39 def b2s(value):
39 """Convert a bool to a unicode string used in bridge 40 """Convert a bool to a unicode string used in bridge
40 @param value: boolean value 41 @param value: boolean value