Commits

Tino de Bruijn committed 39a9bf1

Fixed tests and adapted mockup to new layout argument

  • Participants
  • Parent commits 90c4abc

Comments (0)

Files changed (2)

File pyfirmata/mockup.py

         
 class MockupBoard(pyfirmata.Board):
 
-    def __init__(self, port='', type="arduino", values_dict={}):
+    def __init__(self, port, layout, values_dict={}):
         self.sp = MockupSerial(port, 57600)
-        self.setup_layout(pyfirmata.BOARDS[type])
+        self.setup_layout(layout)
         self.values_dict = values_dict
         self.id = 1
         
     def setUp(self):
         # Test with the MockupSerial so no real connection is needed
         pyfirmata.pyfirmata.serial.Serial = mockup.MockupSerial
-        self.board = pyfirmata.Board('')
+        self.board = pyfirmata.Board('', BOARDS['arduino'])
         self.board._stored_data = [] # FIXME How can it be that a fresh instance sometimes still contains data?
             
 class TestBoardMessages(BoardBaseTest):
     MockupBoard.
     """
     def setUp(self):
-        self.board = mockup.MockupBoard('test')
+        self.board = mockup.MockupBoard('test', BOARDS['arduino'])
 
 board_messages = unittest.TestLoader().loadTestsFromTestCase(TestBoardMessages)
 board_layout = unittest.TestLoader().loadTestsFromTestCase(TestBoardLayout)