def test_dispatch(self): """Test that the force option is handed on to the sync method.""" class MockDotfiles(object): def sync(self, files=None, force=False): assert bool(force) dotfiles = MockDotfiles() cli.dispatch(dotfiles, 'sync', True, [])
def test_dispatch(self): """Test that the force option is handed on to the sync method.""" class MockDotfiles(object): def sync(self, files=None, force=False): assert force class MockNamespace(object): def __init__(self): self.action = 'sync' self.force = True dispatch(MockDotfiles(), MockNamespace(), [])