summaryrefslogtreecommitdiff
path: root/pecan/tests/test_commands.py
diff options
context:
space:
mode:
authorRyan Petrello <lists@ryanpetrello.com>2015-07-29 14:37:49 -0400
committerRyan Petrello <lists@ryanpetrello.com>2015-07-29 14:40:05 -0400
commitb49e8c7be413512866390e0a03ee18802ad3d046 (patch)
tree79b6c5c545c49e86dffa41e381e148bb06ce2de0 /pecan/tests/test_commands.py
parentcbcc8b3e511f8366aabb04b50ce5c482cfcbb6f3 (diff)
downloadpecan-b49e8c7be413512866390e0a03ee18802ad3d046.tar.gz
Pecan has moved to https://github.com/pecan/pecan
Change-Id: I1ee039e0e84cd4c32d49c1a0b858fbc247e75054
Diffstat (limited to 'pecan/tests/test_commands.py')
-rw-r--r--pecan/tests/test_commands.py56
1 files changed, 0 insertions, 56 deletions
diff --git a/pecan/tests/test_commands.py b/pecan/tests/test_commands.py
deleted file mode 100644
index e9d6ead..0000000
--- a/pecan/tests/test_commands.py
+++ /dev/null
@@ -1,56 +0,0 @@
-from pecan.tests import PecanTestCase
-
-
-class TestCommandManager(PecanTestCase):
-
- def test_commands(self):
- from pecan.commands import ServeCommand, ShellCommand, CreateCommand
- from pecan.commands.base import CommandManager
- m = CommandManager()
- assert m.commands['serve'] == ServeCommand
- assert m.commands['shell'] == ShellCommand
- assert m.commands['create'] == CreateCommand
-
-
-class TestCommandRunner(PecanTestCase):
-
- def test_commands(self):
- from pecan.commands import (
- ServeCommand, ShellCommand, CreateCommand, CommandRunner
- )
- runner = CommandRunner()
- assert runner.commands['serve'] == ServeCommand
- assert runner.commands['shell'] == ShellCommand
- assert runner.commands['create'] == CreateCommand
-
- def test_run(self):
- from pecan.commands import CommandRunner
- runner = CommandRunner()
- self.assertRaises(
- RuntimeError,
- runner.run,
- ['serve', 'missing_file.py']
- )
-
-
-class TestCreateCommand(PecanTestCase):
-
- def test_run(self):
- from pecan.commands import CreateCommand
-
- class FakeArg(object):
- project_name = 'default'
- template_name = 'default'
-
- class FakeScaffold(object):
- def copy_to(self, project_name):
- assert project_name == 'default'
-
- class FakeManager(object):
- scaffolds = {
- 'default': FakeScaffold
- }
-
- c = CreateCommand()
- c.manager = FakeManager()
- c.run(FakeArg())