diff options
Diffstat (limited to 'test.py')
| -rwxr-xr-x | test.py | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 |
