Ejemplo n.º 1
0
class SparkIOTests(TestCase):
    def setUp(self):
        self.host = 'api.sprk.io'
        self.i = HTTP('https', self.host)
#        self.i = Mock_Interface()
        self.interface = SparkIO(self.i, self.host)

    def test_instantiation(self):
        self.assertIsInstance(self.interface, SparkIO)

    def test_on(self):
        # Address = (:id, pin)
        result = self.interface.on(('elroy', 'D0'))
        self.assertEqual(result, True)
        time.sleep(5)
Ejemplo n.º 2
0
    def setUp(self):
        self.host = 'api.sprk.io'
        self.i = HTTP('https', self.host)
#        self.i = Mock_Interface()
        self.interface = SparkIO(self.i, self.host)