2015-05-30 20:31:23 +00:00
|
|
|
# Copyright (c) 2015 Nicolas JOUANIN
|
|
|
|
#
|
|
|
|
# See the file license.txt for copying permission.
|
2015-05-26 20:06:59 +00:00
|
|
|
import unittest
|
|
|
|
import logging
|
|
|
|
import time
|
|
|
|
from hbmqtt.broker import Broker
|
|
|
|
|
|
|
|
logging.basicConfig(level=logging.DEBUG)
|
|
|
|
|
|
|
|
class TestBroker(unittest.TestCase):
|
|
|
|
def test_start_broker(self):
|
|
|
|
b = Broker()
|
|
|
|
b.start()
|
2015-05-30 20:31:23 +00:00
|
|
|
time.sleep(100)
|
2015-05-26 20:06:59 +00:00
|
|
|
self.assertEqual(b.machine.state, 'started')
|
|
|
|
b.shutdown()
|