def test_GroundStationInterface_frameFromSerialNoConnection_writeToFile(self):
		frame = 'test_frame'

		gsi = GroundStationInterface(self.CONNECTION_INFO, "Vigo")

		# When the connection to the server is lost the protocol object is removed
		self.cp = None
		gsi._updateLocalFile = mock.Mock()

		# All frames should be processed saved to a local file
		gsi._frameFromSerialport(frame)
		gsi._updateLocalFile.assert_called_once_with(frame)
	def test_GroundStationInterface_frameFromSerial_processFrame(self):
		frame = 'test_frame'

		gsi = GroundStationInterface(self.CONNECTION_INFO, "Vigo", self.cp)

		# Create mock of processFrame to avoid the need of an active server
		self.cp.processFrame = mock.Mock()
		
		# All frames should be processed by the method processFrame in a
		# ClientProtocl object
		gsi._frameFromSerialport(frame)
		self.cp.processFrame.assert_called_once_with(frame)