def _test_headset_2(self, serial_mock):
     """
     Test stopping of streaming
     """
     model = ApplicationModel()
     model.select_port(0, "__test_port_name__")
     model.headsets[0].start()
     model.stop_headsets()
     self.assertFalse(model.is_headset_streaming(), "Should not be streaming from headset")
 def _test_headset_3(self, serial_mock):
     """
     Test starting of toggle streaming
     """
     model = ApplicationModel()
     model.select_port(0, "__test_port_name__")
     model.start_headsets()
     time.sleep(.1)
     self.assertTrue(model.is_headset_streaming(), "Should be streaming from headset")
     model.stop_headsets()
 def _test_headset_2(self, serial_mock):
     """
     Test stopping of streaming
     """
     model = ApplicationModel()
     model.select_port(0, "__test_port_name__")
     model.headsets[0].start()
     model.stop_headsets()
     self.assertFalse(model.is_headset_streaming(),
                      "Should not be streaming from headset")
 def _test_headset_3(self, serial_mock):
     """
     Test starting of toggle streaming
     """
     model = ApplicationModel()
     model.select_port(0, "__test_port_name__")
     model.start_headsets()
     time.sleep(.1)
     self.assertTrue(model.is_headset_streaming(),
                     "Should be streaming from headset")
     model.stop_headsets()
 def test_init(self):
     """
     Tests for initial state
     """
     model = ApplicationModel()
     
     self.assertEqual(model.get_simulation_state(), DataSimulator.IDLE, "Simulation state should initialize as IDLE")
     self.assertFalse(model.is_receiving_data(), "Should not be receiving data")
     self.assertFalse(model.is_recording(), "Should not be recording data")
     self.assertFalse(model.is_headset_streaming(), "Should not be streaming from headset")
     self.assertFalse(model.is_headset_connected(), "No headset should be selected")