Move 'auto_start' option default to Service and add unit tests
Signed-off-by: Chris Corbyn <chris@w3style.co.uk>
This commit is contained in:
parent
edf6b56016
commit
0c12db06ec
4 changed files with 12 additions and 11 deletions
|
|
@ -13,7 +13,7 @@ class ProjectTest(unittest.TestCase):
|
|||
{
|
||||
'name': 'db',
|
||||
'image': 'ubuntu'
|
||||
}
|
||||
},
|
||||
], None)
|
||||
self.assertEqual(len(project.services), 2)
|
||||
self.assertEqual(project.get_service('web').name, 'web')
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@ class ServiceTest(unittest.TestCase):
|
|||
Service('a')
|
||||
Service('foo')
|
||||
|
||||
def test_auto_start_defaults_true(self):
|
||||
service = Service(name='foo', project='bar')
|
||||
self.assertEqual(service.options['auto_start'], True)
|
||||
|
||||
def test_project_validation(self):
|
||||
self.assertRaises(ConfigError, lambda: Service(name='foo', project='_'))
|
||||
Service(name='foo', project='bar')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue