aboutsummaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test.py')
-rwxr-xr-xtest.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/test.py b/test.py
index bfb27e3..b0a892f 100755
--- a/test.py
+++ b/test.py
@@ -53,20 +53,26 @@ scheduled_state_template = Template("""
"changes": {"alice": [], "bob": [], "charlie": []}}""")
-def run_bot(test, sender, cmd):
+def _run_bot(sender, cmd):
msg = msg_template.substitute(sender=sender, msg=cmd).replace("\n",
"\\n") + "\n"
res = subprocess.run(
["python3", "./geldschieberbot.py"],
text=True,
capture_output=True,
- check=True,
+ check=False,
# res = subprocess.run(["python3", "./bot.py"], text=True, capture_output=True,
input=msg)
if res.returncode != 0:
print(res.stdout)
print(res.stderr)
+
+ return res
+
+
+def run_bot(test, sender, cmd):
+ res = _run_bot(sender, cmd)
test.assertEqual(res.returncode, 0)
test.assertEqual(res.stderr, "")
return res