From 82f5857759e0262e43ec11f4319395b6a373872d Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Mon, 3 Sep 2007 17:06:49 -0700 Subject: Make gitosis-serve not fail with commands without arguments. --- gitosis/test/test_serve.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gitosis/test/test_serve.py') diff --git a/gitosis/test/test_serve.py b/gitosis/test/test_serve.py index a79dbaf..416587a 100644 --- a/gitosis/test/test_serve.py +++ b/gitosis/test/test_serve.py @@ -21,6 +21,18 @@ def test_bad_newLine(): eq(str(e), 'Command may not contain newline') assert isinstance(e, serve.ServingError) +def test_bad_nospace(): + cfg = RawConfigParser() + e = assert_raises( + serve.UnknownCommandError, + serve.serve, + cfg=cfg, + user='jdoe', + command='git-upload-pack', + ) + eq(str(e), 'Unknown command denied') + assert isinstance(e, serve.ServingError) + def test_bad_command(): cfg = RawConfigParser() e = assert_raises( -- cgit v1.2.3