From 2199b62783fbaaa5003a8a54e46751dd10cad39d Mon Sep 17 00:00:00 2001 From: Ben Firshman Date: Mon, 9 Dec 2013 18:42:33 +0000 Subject: [PATCH] Test that names are created correctly --- plum/tests/service_test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plum/tests/service_test.py b/plum/tests/service_test.py index 49c4d5854..5af3ef7b7 100644 --- a/plum/tests/service_test.py +++ b/plum/tests/service_test.py @@ -27,6 +27,7 @@ class ContainersTestCase(ServiceTestCase): foo.start() self.assertEqual(len(foo.containers), 1) + self.assertEqual(foo.containers[0]['Names'], ['/foo_1']) self.assertEqual(len(bar.containers), 0) bar.scale(2) @@ -34,6 +35,10 @@ class ContainersTestCase(ServiceTestCase): self.assertEqual(len(foo.containers), 1) self.assertEqual(len(bar.containers), 2) + names = [c['Names'] for c in bar.containers] + self.assertIn(['/bar_1'], names) + self.assertIn(['/bar_2'], names) + class ScalingTestCase(ServiceTestCase): def setUp(self):