def test_calls_validate_response(self, mock_validate_response): tstat = CommonThermostat(IP) tstat.reboot() mock_validate_response.assert_called_once_with(RESPONSE_VALUE)
def test_calls_post(self, mock_post): tstat = CommonThermostat('192.168.0.1') tstat.set_day_program('cool', 'tue', PROGRAM) mock_post.assert_called_once_with('/tstat/program/cool/tue', json.dumps(PROGRAM).encode('utf-8'))
def test_calls_post(self, mock_validate_response, mock_post): tstat = CommonThermostat(IP) tstat.reboot() mock_post.assert_called_once_with(COMMAND, JSON_VALUE)