summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/16_test_supercommand.py (renamed from tests/16_test_wrapper.py)21
1 files changed, 17 insertions, 4 deletions
diff --git a/tests/16_test_wrapper.py b/tests/16_test_supercommand.py
index 35f50bc..5a9f037 100644
--- a/tests/16_test_wrapper.py
+++ b/tests/16_test_supercommand.py
@@ -16,14 +16,27 @@
"""Test L{gbp} command wrapper"""
import unittest
-import gbp.scripts.command
+import gbp.scripts.supercommand
-class TestWrapper(unittest.TestCase):
+class TestSuperCommand(unittest.TestCase):
+
+ def test_import(self):
+ self.assertRaises(ImportError,
+ gbp.scripts.supercommand.import_command,
+ 'not.allowed')
+ self.assertRaises(ImportError,
+ gbp.scripts.supercommand.import_command,
+ 'not/allowed')
+ self.assertRaises(ImportError,
+ gbp.scripts.supercommand.import_command,
+ '0notallowed')
def test_invalid_command(self):
"""Test if we can import a valid command"""
- self.assertEqual(gbp.scripts.command.gbp_command(['argv0', 'asdf']), 2)
+ self.assertEqual(gbp.scripts.supercommand.supercommand(
+ ['argv0', 'asdf']), 2)
def test_missing_arg(self):
- self.assertEqual(gbp.scripts.command.gbp_command(['argv0']), 1)
+ self.assertEqual(gbp.scripts.supercommand.supercommand(
+ ['argv0']), 1)