def setUp(self, mock_txtx, mock_rxrx): global mock_tx global mock_rx global tport mock_rx = mock_rxrx mock_tx = mock_txtx tport = transport.Transport(True, None, None, None)
def test_should_init_rxsensitivity(self, mock_tx, mock_rx): quiet_init = None wav_prefix = None framerate = None rxsens = 0.04 t = transport.Transport(quiet_init, wav_prefix, framerate, rxsens) sert(mock_rx).called_once_with(2, 1, 44100, False, None, 0.04) sert(mock_tx).called_once_with(2, 1, 44100, False, None)
def test_should_init_wav_file(self, mock_tx, mock_rx): quiet_init = None wav_prefix = 'pfx' framerate = None rxsens = None t = transport.Transport(quiet_init, wav_prefix, framerate, rxsens) sert(mock_rx).called_once_with(2, 1, 44100, False, 'pfx_rx.wav', 0.11) sert(mock_tx).called_once_with(2, 1, 44100, False, 'pfx_tx.wav')
def test_should_init_framerate(self, mock_tx, mock_rx): quiet_init = None wav_prefix = None framerate = 22050 rxsens = None t = transport.Transport(quiet_init, wav_prefix, framerate, rxsens) sert(mock_rx).called_once_with(2, 1, 22050, False, None, 0.11) sert(mock_tx).called_once_with(2, 1, 22050, False, None)
def test_should_init_quietly(self, mock_tx, mock_rx): quiet_init = True wav_prefix = None framerate = None rxsens = None t = transport.Transport(quiet_init, wav_prefix, framerate, rxsens) sert(mock_rx).called_once_with(2, 1, 44100, True, None, 0.11) sert(mock_tx).called_once_with(2, 1, 44100, True, None)