def setUp(self): JNTTBase.setUp(self) self.factory = {} for entry in iter_entry_points(group='janitoo.components'): try: loaded = entry.load() self.factory[entry.name] = loaded except Exception: #traceback.print_exc() pass print "Component %s" % self.component_name
def setUp(self): JNTTBase.setUp(self) self.mqttc = None self.message = None self.message_received = False self.hearbeat_mqttc = None self.heartbeat_message = None self.heartbeat_waiting = None self.heartbeat_waitings = None self.heartbeat_received = False self.server = None self.running_server = None if self.hadd_ctrl is None and self.hadds is not None and len(self.hadds) > 0: self.hadd_ctrl = self.hadds[0]
def tearDown(self): self.stopClient() self.mqttc = None self.mqtthearbeat = None self.stopClient() self.stopServer() self.mqttc = None self.message = None self.message_received = False self.hearbeat_mqttc = None self.heartbeat_message = None self.heartbeat_waiting = None self.heartbeat_waitings = None self.heartbeat_received = False self.server = None self.running_server = None JNTTBase.tearDown(self)
def tearDown(self): self.factory = None JNTTBase.tearDown(self)
def setUp(self): JNTTBase.setUp(self)
You should have received a copy of the GNU General Public License along with Janitoo. If not, see <http://www.gnu.org/licenses/>. """ __author__ = 'Sébastien GALLET aka bibi21000' __email__ = '*****@*****.**' __copyright__ = "Copyright © 2013-2014-2015-2016 Sébastien GALLET aka bibi21000" import warnings warnings.filterwarnings("ignore") import sys, os import time import unittest import logging import threading import mock import logging from janitoo_nosetests import JNTTBase from janitoo_nosetests.server import JNTTDockerServerCommon, JNTTDockerServer from janitoo.runner import Runner, jnt_parse_args from janitoo.server import JNTServer from janitoo.utils import HADD_SEP, HADD JNTTBase.onlyDockerTest() from .test_values import TestIpPing, TestBlinkValue, TestUpDown
def assertFsmBoot(self, state="booting"): """Assert Finish State Machine can boot """ thread = self.server.find_thread(self.server_section) self.assertNotEqual(thread, None) JNTTBase.assertFsmBoot(self, bus=thread.bus, state="booting")
import logging import threading import mock import logging from janitoo_nosetests import JNTTBase from janitoo_nosetests.dbserver import JNTTDBDockerServerCommon, JNTTDBDockerServer, jntt_docker_dbserver from janitoo_nosetests.models import jntt_docker_fullmodels, jntt_docker_models from janitoo.runner import Runner, jnt_parse_args from janitoo.server import JNTServer from janitoo.utils import HADD_SEP, HADD sys.path.insert(0, os.path.abspath('.')) JNTTBase.onlyDockerTest() from .test_full_models import CommonFullModels #Launch CommonFullModels tests for every supported database jntt_docker_fullmodels(__name__, CommonFullModels, prefix='DbFull') from .test_models import ModelsCommon #Launch ModelsCommon tests for every supported database jntt_docker_models(__name__, ModelsCommon, prefix='DbFull') from .test_migrate import CommonModels as MigrateCommon #Launch MigrateCommon tests for every supported database jntt_docker_models(__name__, MigrateCommon, prefix='DbFullMigrate') from .test_server import CommonServer #Launch CommonServer tests for every supported database
def tearDown(self): JNTTBase.tearDown(self)
def test_001_connect_to_server(self): JNTTBase.onlyDockerTest() for port in self.ports: self.assertTCP(self.host, port)
def setUp(self): JNTTBase.setUp(self) self.options = JNTOptions({"conf_file": self.getDataFile(self.client_conf)}) self.root = self.create_root()