<filename>test/client/device/common/test_thread_base.py
import unittest

from nose.tools import eq_

from buoy.client.device.common.base import BaseThread
from buoy.client.notification.client.common import NoticePriorityQueue


class TestThreadBase(unittest.TestCase):
    def setUp(self):
        queue_notice = NoticePriorityQueue()
        self.thread = BaseThread(queue_notice=queue_notice)

    def test_is_aliveReturnFalse_when_createThread(self):
        eq_(self.thread.is_alive(), False)

    def test_is_aliveReturnFalse_when_stopThread(self):
        self.thread.active = True

        self.thread.stop()
        eq_(self.thread.is_alive(), False)


if __name__ == '__main__':
    unittest.main()

<filename>test/client/device/common/test_thread_base.py
import unittest

from nose.tools import eq_

from buoy.client.device.common.base import BaseThread
from buoy.client.notification.client.common import NoticePriorityQueue


class TestThreadBase(unittest.TestCase):
    def setUp(self):
        queue_notice = NoticePriorityQueue()
        self.thread = BaseThread(queue_notice=queue_notice)

    def test_is_aliveReturnFalse_when_createThread(self):
        eq_(self.thread.is_alive(), False)

    def test_is_aliveReturnFalse_when_stopThread(self):
        self.thread.active = True

        self.thread.stop()
        eq_(self.thread.is_alive(), False)


if __name__ == '__main__':
    unittest.main()
