summaryrefslogtreecommitdiff
path: root/tests/api_sendt_eth0_1s1r
diff options
context:
space:
mode:
Diffstat (limited to 'tests/api_sendt_eth0_1s1r')
-rw-r--r--tests/api_sendt_eth0_1s1r/receiver.py3
-rw-r--r--tests/api_sendt_eth0_1s1r/sender.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/api_sendt_eth0_1s1r/receiver.py b/tests/api_sendt_eth0_1s1r/receiver.py
index 0d8561e..256de6a 100644
--- a/tests/api_sendt_eth0_1s1r/receiver.py
+++ b/tests/api_sendt_eth0_1s1r/receiver.py
@@ -1,9 +1,10 @@
#!/usr/bin/env python
+from esds import RCode
def receive(node):
##### Simple receive
code, data=node.receive("eth0")
- msg="Received: "+data if code == 0 else "Receive failed code="+str(code)
+ msg="Received: "+data if code == RCode.SUCCESS else "Receive failed code="+str(code)
node.log(msg)
def execute(api):
diff --git a/tests/api_sendt_eth0_1s1r/sender.py b/tests/api_sendt_eth0_1s1r/sender.py
index c7fdb0d..1da11b1 100644
--- a/tests/api_sendt_eth0_1s1r/sender.py
+++ b/tests/api_sendt_eth0_1s1r/sender.py
@@ -1,8 +1,9 @@
#!/usr/bin/env python
+from esds import RCode
def sendt(node,timeout):
code=node.sendt("eth0","Hello World!",1,1,timeout)
- msg="Send worked!" if code == 0 else "Send failed"
+ msg="Send worked!" if code == RCode.SUCCESS else "Send failed"
node.log(msg)
def execute(api):