def test_tape_error(self): radio = Radio() # set up known values radio.tape_side = 1 # parse display radio.parse(b"TAPE ERROR ") self.assertEqual(radio.tape_side, 0) self.assertEqual(radio.operation_mode, OperationModes.TAPE_ERROR) self.assertEqual(radio.display_mode, DisplayModes.SHOWING_OPERATION)
def test_tape_no_tape(self): radio = Radio() # set up known values radio.tape_side = 1 # parse display radio.parse(b" NO TAPE") self.assertEqual(radio.tape_side, 0) self.assertEqual(radio.operation_mode, OperationModes.TAPE_NO_TAPE) self.assertEqual(radio.display_mode, DisplayModes.SHOWING_OPERATION)
def test_tape_mss_rew(self): radio = Radio() # set up known values radio.tape_side = 2 # parse display radio.parse(b"TAPEMSS REW") self.assertEqual(radio.tape_side, 2) self.assertEqual(radio.operation_mode, OperationModes.TAPE_MSS_REW) self.assertEqual(radio.display_mode, DisplayModes.SHOWING_OPERATION)
def test_tape_load_premium_5(self): radio = Radio() # set up known values radio.tape_side = 1 # parse display radio.parse(b"TAPE LOAD ") self.assertEqual(radio.tape_side, 0) self.assertEqual(radio.operation_mode, OperationModes.TAPE_LOAD) self.assertEqual(radio.display_mode, DisplayModes.SHOWING_OPERATION)
def test_tape_scan_b(self): radio = Radio() # set up known values radio.tape_side = 1 radio.operation_mode = OperationModes.TUNER_PLAYING # parse display radio.parse(b"TAPE SCAN B") self.assertEqual(radio.tape_side, 2) self.assertEqual(radio.operation_mode, OperationModes.TAPE_SCANNING) self.assertEqual(radio.display_mode, DisplayModes.SHOWING_OPERATION)
def test_tape_play_a(self): radio = Radio() # set up known values radio.tape_side = 2 radio.operation_mode = OperationModes.TUNER_PLAYING # parse display radio.parse(b"TAPE PLAY A") self.assertEqual(radio.tape_side, 1) self.assertEqual(radio.operation_mode, OperationModes.TAPE_PLAYING) self.assertEqual(radio.display_mode, DisplayModes.SHOWING_OPERATION)
def test_tape_metal_premium_5(self): radio = Radio() # set up known values radio.tape_side = 1 radio.operation_mode = OperationModes.TAPE_PLAYING # parse display radio.parse(b"TAPE METAL ") self.assertEqual(radio.tape_side, 1) self.assertEqual(radio.operation_mode, OperationModes.TAPE_METAL) self.assertEqual(radio.display_mode, DisplayModes.SHOWING_OPERATION)