Skip to content

Commit

Permalink
Moved salve.settings.config to salve.config
Browse files Browse the repository at this point in the history
Rather than having a whole package devoted to settings, which does not properly
encapsulate the global execution context and other classifiable "settings", the
config package is exposed within the toplevel salve package. This is a clearer
breakdown. Config can be turned into a package if there is a call to do so in
the future.
  • Loading branch information
sirosen committed Aug 2, 2014
1 parent c17a4b8 commit 057240a
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion salve/cli/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from salve.util.error import SALVEException
from salve.util import locations
from salve.block import manifest_block
from salve.settings import config
from salve import config


def run_on_manifest(root_manifest, args):
Expand Down
File renamed without changes.
Empty file removed salve/settings/__init__.py
Empty file.
4 changes: 2 additions & 2 deletions tests/unit/block/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import mock

import salve.settings.config
import salve.config
from salve.util.context import FileContext, ExecutionContext
from salve.util.log import Logger

Expand All @@ -30,7 +30,7 @@ def mock_expanduser(string):
with mock.patch('os.path.expanduser', mock_expanduser):
with mock.patch('salve.exec_context', dummy_exec_context):
with mock.patch('salve.logger', dummy_logger):
dummy_conf = salve.settings.config.SALVEConfig()
dummy_conf = salve.config.SALVEConfig()

# must be set after conf is created, otherwise they will be overidden by
# config initialization
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/cli/deploy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def compile(self):
return MockAction()

with mock.patch('salve.block.manifest_block.ManifestBlock', MockManifest):
with mock.patch('salve.settings.config.SALVEConfig', mock.Mock()):
with mock.patch('salve.config.SALVEConfig', mock.Mock()):
deploy.main(fake_args)

assert have_run['action_execute']
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/settings/config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from tests.utils.exceptions import ensure_except
from salve.util.error import SALVEException

import salve.settings.config as config
from salve import config

_testfile_dir = pjoin(dirname(__file__), 'files')
_homes_dir = pjoin(dirname(__file__), 'homes')
Expand Down

0 comments on commit 057240a

Please sign in to comment.