Extract helper methods for building config objects from dicts
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
3f3c05e465
commit
2c75a8fdf5
4 changed files with 36 additions and 32 deletions
|
|
@ -11,6 +11,7 @@ from operator import itemgetter
|
|||
import py
|
||||
import pytest
|
||||
|
||||
from ...helpers import build_config_details
|
||||
from compose.config import config
|
||||
from compose.config.config import resolve_build_args
|
||||
from compose.config.config import resolve_environment
|
||||
|
|
@ -43,12 +44,6 @@ def service_sort(services):
|
|||
return sorted(services, key=itemgetter('name'))
|
||||
|
||||
|
||||
def build_config_details(contents, working_dir='working_dir', filename='filename.yml'):
|
||||
return config.ConfigDetails(
|
||||
working_dir,
|
||||
[config.ConfigFile(filename, contents)])
|
||||
|
||||
|
||||
class ConfigTest(unittest.TestCase):
|
||||
def test_load(self):
|
||||
service_dicts = config.load(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue