Example #1
0
class TestConnectionPool(unittest.TestCase):
    def setUp(self):
        self.ledpool = LedControllerPool(["127.0.0.1", "127.0.0.2"])

    def test_set_color_0(self):
        self.ledpool.execute(0, "set_color", "red", 1)

    def test_set_color_1(self):
        self.ledpool.execute(1, "set_color", "blue", 3)

    def test_on(self):
        self.ledpool.execute(0, "on")
Example #2
0
class TestConnectionPool(unittest.TestCase):
    def setUp(self):
        self.ledpool = LedControllerPool(["127.0.0.1", "127.0.0.2"])

    def test_set_color_0(self):
        self.ledpool.execute(0, "set_color", "red", 1)

    def test_set_color_1(self):
        self.ledpool.execute(1, "set_color", "blue", 3)

    def test_on(self):
        self.ledpool.execute(0, "on")
class TestConnectionPool(unittest.TestCase):
    # pylint: disable=missing-docstring
    """
    Tests commands sent using connection pools (multiple gateways)
    """
    def setUp(self):
        self.ledpool = LedControllerPool(["127.0.0.1", "127.0.0.2"])

    def test_set_color_0(self):
        """ Test setting color in controller 0 """
        self.ledpool.execute(0, "set_color", "red", 1)

    def test_set_color_1(self):
        """ Test setting color in controller 1 """
        self.ledpool.execute(1, "set_color", "aqua", 3)

    def test_on(self):
        """ Test turning lights on """
        self.ledpool.execute(0, "on")
Example #4
0
class TestConnectionPool(unittest.TestCase):
    # pylint: disable=missing-docstring
    """
    Tests commands sent using connection pools (multiple gateways)
    """
    def setUp(self):
        self.ledpool = LedControllerPool(["127.0.0.1", "127.0.0.2"])

    def test_set_color_0(self):
        """ Test setting color in controller 0 """
        self.ledpool.execute(0, "set_color", "red", 1)

    def test_set_color_1(self):
        """ Test setting color in controller 1 """
        self.ledpool.execute(1, "set_color", "aqua", 3)

    def test_on(self):
        """ Test turning lights on """
        self.ledpool.execute(0, "on")
Example #5
0
 def setUp(self):
     self.ledpool = LedControllerPool(["127.0.0.1", "127.0.0.2"])
Example #6
0
 def setUp(self):
     self.ledpool = LedControllerPool(["127.0.0.1", "127.0.0.2"])