Remove flake8 ignores and wrap the longest lines to 140 char.

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
Daniel Nephin 2015-08-26 12:53:11 -04:00
commit 54973e8200
8 changed files with 65 additions and 16 deletions

View file

@ -529,7 +529,10 @@ class MemoryOptionsTest(unittest.TestCase):
When you set a 'memswap_limit' it is invalid config unless you also set
a mem_limit
"""
expected_error_msg = "Invalid 'memswap_limit' configuration for 'foo' service: when defining 'memswap_limit' you must set 'mem_limit' as well"
expected_error_msg = (
"Invalid 'memswap_limit' configuration for 'foo' service: when "
"defining 'memswap_limit' you must set 'mem_limit' as well"
)
with self.assertRaisesRegexp(ConfigurationError, expected_error_msg):
config.load(
config.ConfigDetails(

View file

@ -142,4 +142,12 @@ class GetContainerNameTestCase(unittest.TestCase):
self.assertIsNone(get_container_name({}))
self.assertEqual(get_container_name({'Name': 'myproject_db_1'}), 'myproject_db_1')
self.assertEqual(get_container_name({'Names': ['/myproject_db_1', '/myproject_web_1/db']}), 'myproject_db_1')
self.assertEqual(get_container_name({'Names': ['/swarm-host-1/myproject_db_1', '/swarm-host-1/myproject_web_1/db']}), 'myproject_db_1')
self.assertEqual(
get_container_name({
'Names': [
'/swarm-host-1/myproject_db_1',
'/swarm-host-1/myproject_web_1/db'
]
}),
'myproject_db_1'
)