How to use the mackup.config.Config function in mackup

To help you get started, we’ve selected a few mackup examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lra / mackup / tests / config_tests.py View on Github external
def test_config_engine_filesystem_absolute(self):
        cfg = Config("mackup-engine-file_system-absolute.cfg")

        assert isinstance(cfg.engine, str)
        assert cfg.engine == ENGINE_FS

        assert isinstance(cfg.path, str)
        assert cfg.path == u"/some/absolute/folder"

        assert isinstance(cfg.directory, str)
        assert cfg.directory == u"custom_folder"

        assert isinstance(cfg.fullpath, str)
        assert cfg.fullpath == u"/some/absolute/folder/custom_folder"

        assert cfg.apps_to_ignore == set(["subversion", "sequel-pro"])
        assert cfg.apps_to_sync == set()
github lra / mackup / tests / config_tests.py View on Github external
def test_config_no_config(self):
        cfg = Config()

        # Should should do the same as the default, empty configuration
        assert isinstance(cfg.engine, str)
        assert cfg.engine == ENGINE_DROPBOX

        assert isinstance(cfg.path, str)
        print(cfg.path)
        assert cfg.path == "/home/some_user/Dropbox"

        assert isinstance(cfg.directory, str)
        assert cfg.directory == u"Mackup"

        assert isinstance(cfg.fullpath, str)
        assert cfg.fullpath == u"/home/some_user/Dropbox/Mackup"

        assert cfg.apps_to_ignore == set()
github lra / mackup / tests / config_tests.py View on Github external
def test_config_engine_google_drive(self):
        cfg = Config("mackup-engine-google_drive.cfg")

        assert isinstance(cfg.engine, str)
        assert cfg.engine == ENGINE_GDRIVE

        assert isinstance(cfg.path, str)
        assert cfg.path == u"/Users/whatever/Google Drive"

        assert isinstance(cfg.directory, str)
        assert cfg.directory == u"Mackup"

        assert isinstance(cfg.fullpath, str)
        assert cfg.fullpath.endswith(u"/Google Drive/Mackup")

        assert cfg.apps_to_ignore == set(["subversion", "sequel-pro", "sabnzbd"])
        assert cfg.apps_to_sync == set(["sublime-text-3", "x11", "sabnzbd"])
github lra / mackup / tests / config_tests.py View on Github external
def test_config_engine_copy(self):
        cfg = Config("mackup-engine-copy.cfg")

        assert isinstance(cfg.engine, str)
        assert cfg.engine == ENGINE_COPY

        assert isinstance(cfg.path, str)
        assert cfg.path == u"/Users/someuser/Copy"

        assert isinstance(cfg.directory, str)
        assert cfg.directory == u"Mackup"

        assert isinstance(cfg.fullpath, str)
        assert cfg.fullpath.endswith(u"/Copy/Mackup")

        assert cfg.apps_to_ignore == set(["subversion", "sequel-pro", "sabnzbd"])
        assert cfg.apps_to_sync == set(["sublime-text-3", "x11", "sabnzbd"])
github lra / mackup / tests / config_tests.py View on Github external
def test_config_apps_to_sync(self):
        cfg = Config("mackup-apps_to_sync.cfg")

        assert isinstance(cfg.engine, str)
        assert cfg.engine == ENGINE_DROPBOX

        assert isinstance(cfg.path, str)
        assert cfg.path == u"/home/some_user/Dropbox"

        assert isinstance(cfg.directory, str)
        assert cfg.directory == u"Mackup"

        assert isinstance(cfg.fullpath, str)
        assert cfg.fullpath == u"/home/some_user/Dropbox/Mackup"

        assert cfg.apps_to_ignore == set()
        assert cfg.apps_to_sync == set(["sabnzbd", "sublime-text-3", "x11"])
github lra / mackup / tests / config_tests.py View on Github external
def test_config_engine_filesystem_no_path(self):
        with self.assertRaises(ConfigError):
            Config("mackup-engine-file_system-no_path.cfg")
github lra / mackup / tests / config_tests.py View on Github external
def test_config_engine_dropbox(self):
        cfg = Config("mackup-engine-dropbox.cfg")

        assert isinstance(cfg.engine, str)
        assert cfg.engine == ENGINE_DROPBOX

        assert isinstance(cfg.path, str)
        assert cfg.path == u"/home/some_user/Dropbox"

        assert isinstance(cfg.directory, str)
        assert cfg.directory == u"some_weirld_name"

        assert isinstance(cfg.fullpath, str)
        assert cfg.fullpath == u"/home/some_user/Dropbox/some_weirld_name"

        assert cfg.apps_to_ignore == set()
        assert cfg.apps_to_sync == set()
github lra / mackup / tests / config_tests.py View on Github external
def test_config_apps_to_ignore(self):
        cfg = Config("mackup-apps_to_ignore.cfg")

        assert isinstance(cfg.engine, str)
        assert cfg.engine == ENGINE_DROPBOX

        assert isinstance(cfg.path, str)
        assert cfg.path == "/home/some_user/Dropbox"

        assert isinstance(cfg.directory, str)
        assert cfg.directory == u"Mackup"

        assert isinstance(cfg.fullpath, str)
        assert cfg.fullpath == u"/home/some_user/Dropbox/Mackup"

        assert cfg.apps_to_ignore == set(["subversion", "sequel-pro", "sabnzbd"])
        assert cfg.apps_to_sync == set()
github lra / mackup / mackup / mackup.py View on Github external
def __init__(self):
        """Mackup Constructor."""
        self._config = config.Config()

        self.mackup_folder = self._config.fullpath
        self.temp_folder = tempfile.mkdtemp(prefix="mackup_tmp_")