summaryrefslogtreecommitdiff
path: root/tests/simple_sendt_eth0_1s1r/sender.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/simple_sendt_eth0_1s1r/sender.py')
-rw-r--r--tests/simple_sendt_eth0_1s1r/sender.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/simple_sendt_eth0_1s1r/sender.py b/tests/simple_sendt_eth0_1s1r/sender.py
new file mode 100644
index 0000000..ee2ea9d
--- /dev/null
+++ b/tests/simple_sendt_eth0_1s1r/sender.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+
+def sendt(node,timeout):
+ code=node.sendt("eth0","Hello World!",1,1,timeout)
+ msg="Send worked!" if code == 0 else "Send failed"
+ node.log(msg)
+
+def execute(api):
+ # Should work
+ sendt(api,2)
+ # Should not work
+ sendt(api,0.5)
+ # Should work
+ sendt(api,2)