CallDistanceTransceiver.py: make DummyModem look more like Modem
authorAntonio Ospite <ao2@ao2.it>
Sat, 2 Jan 2016 15:20:59 +0000 (16:20 +0100)
committerAntonio Ospite <ao2@ao2.it>
Sun, 3 Jan 2016 18:59:49 +0000 (19:59 +0100)
The "response" argument is optional in the get_response() method, this
avoids getting an error when trying to transmit with DummyModem:

  TypeError: get_response() missing 1 required positional argument: 'response'

src/savemysugar/CallDistanceTransceiver.py

index 588c985..6361afa 100755 (executable)
@@ -424,7 +424,7 @@ def test_send_receive():
         def send_command(self, command):
             pass
 
         def send_command(self, command):
             pass
 
-        def get_response(self, response):
+        def get_response(self, response=None):
             # pylint: disable=unused-argument
 
             setup_time = random.uniform(self.transceiver.modulator.period_min,
             # pylint: disable=unused-argument
 
             setup_time = random.uniform(self.transceiver.modulator.period_min,