test: store the constants in constants.py + better PEP8 compliance

This commit is contained in:
souliane 2014-01-04 15:45:08 +01:00
commit a21e3c2783

38
src/test/constants.py Normal file
View file

@ -0,0 +1,38 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Primitivus: a SAT frontend
# Copyright (C) 2009, 2010, 2011, 2012, 2013 Jérôme Poisson (goffi@goffi.org)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.i18n import _, D_
from twisted.words.protocols.jabber.jid import JID
class Const(object):
TEST_JID_STR = u"test@example.org/SàT"
TEST_JID = JID(TEST_JID_STR)
TEST_JID_2_STR = u"sender@example.net/house"
TEST_JID_2 = JID(TEST_JID_2_STR)
TEST_PROFILE = 'test_profile'
# To test frontend parameters
APP_NAME = "dummy_frontend"
SECURITY_LIMIT = 0
ENABLE_UNIBOX_KEY = D_("Composition")
ENABLE_UNIBOX_PARAM = D_("Enable unibox")