From 4a6accf48396b76114c0729fa911b4f6080a4631 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 2 Jan 2018 19:33:33 +0100 Subject: [PATCH] s/push/send_request/g --- platypush/pusher/__init__.py | 2 +- platypush/pusher/__main__.py | 2 +- tests/test_local.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platypush/pusher/__init__.py b/platypush/pusher/__init__.py index 2eb174bf25..ba1c0c6a7c 100644 --- a/platypush/pusher/__init__.py +++ b/platypush/pusher/__init__.py @@ -142,7 +142,7 @@ class Pusher(object): }) - def push(self, target, action, backend=None, + def send_request(self, target, action, backend=None, timeout=default_response_wait_timeout, **kwargs): """ Sends a message on a backend and optionally waits for an answer. diff --git a/platypush/pusher/__main__.py b/platypush/pusher/__main__.py index 0ab8489436..dfb401c3ac 100644 --- a/platypush/pusher/__main__.py +++ b/platypush/pusher/__main__.py @@ -12,7 +12,7 @@ def main(args=sys.argv[1:]): print(opts.args) pusher.send_event(target=opts.target, type=opts.event, **opts.args) else: - pusher.push(target=opts.target, action=opts.action, timeout=opts.timeout, **opts.args) + pusher.send_request(target=opts.target, action=opts.action, timeout=opts.timeout, **opts.args) main() diff --git a/tests/test_local.py b/tests/test_local.py index bde24c05e2..a0fc158acb 100644 --- a/tests/test_local.py +++ b/tests/test_local.py @@ -52,7 +52,7 @@ class TestLocal(unittest.TestCase): on_response=self.on_response()) logging.info('Sending request') - pusher.push(target=Config.get('device_id'), action='shell.exec', + pusher.send_request(target=Config.get('device_id'), action='shell.exec', cmd='echo ping', timeout=None)