From cadfa750ca0c950d61ded1dbad85beea9d152ef8 Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Tue, 29 Dec 2015 07:07:28 -0500 Subject: Move CLI tests into separate file The intent is for each file in dotfiles/ to have a matching test file in tests/ so there is less confusion about which test files are testing which bits of functionality and where to look. --- tests/test_cli.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/test_cli.py (limited to 'tests/test_cli.py') diff --git a/tests/test_cli.py b/tests/test_cli.py new file mode 100644 index 0000000..f2cd979 --- /dev/null +++ b/tests/test_cli.py @@ -0,0 +1,16 @@ +from dotfiles.cli 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(), []) -- cgit v1.2.3