aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_cli_orig.py
diff options
context:
space:
mode:
authorGravatar Jon Bernard <jbernard@tuxion.com> 2015-12-31 11:03:55 -0500
committerGravatar Jon Bernard <jbernard@tuxion.com> 2015-12-31 11:25:04 -0500
commita1c63b3585436de59ffebaf25f9d9e56424cbce1 (patch)
treed5ac6717fb08c941c3c3cbf5daed6cfe0f27de0c /tests/test_cli_orig.py
parent3dc6dd855600eb176684deaecfc360ef81f8ca72 (diff)
downloaddotfiles-a1c63b3585436de59ffebaf25f9d9e56424cbce1.tar.gz
dotfiles-a1c63b3585436de59ffebaf25f9d9e56424cbce1.tar.bz2
dotfiles-a1c63b3585436de59ffebaf25f9d9e56424cbce1.zip
Rename existing cli files
I'm in the process of reimplementing the CLI using click and this new implementation will take the place of the existing one once it's feature complete.
Diffstat (limited to 'tests/test_cli_orig.py')
-rw-r--r--tests/test_cli_orig.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_cli_orig.py b/tests/test_cli_orig.py
new file mode 100644
index 0000000..58872e3
--- /dev/null
+++ b/tests/test_cli_orig.py
@@ -0,0 +1,16 @@
+from dotfiles.cli_orig import dispatch
+
+
+def test_dispatch():
+ """Test that the force option is handed on to the sync method."""
+
+ class MockDotfiles:
+ def sync(self, files=None, force=False):
+ assert force
+
+ class MockNamespace:
+ def __init__(self):
+ self.action = 'sync'
+ self.force = True
+
+ dispatch(MockDotfiles(), MockNamespace(), [])