]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Give each cli its own test.
authorSteve Baker <sbaker@redhat.com>
Sun, 5 May 2013 22:53:56 +0000 (10:53 +1200)
committerSteve Baker <sbaker@redhat.com>
Sun, 5 May 2013 22:53:56 +0000 (10:53 +1200)
This will give a nicer failure message, and results in 3
slowish tests instead of 1 really slow one.

Change-Id: I5c3fbd2507068908c165e163b8f458bf8cb00bc1

heat/tests/test_cli.py

index 934bfdf588f82d510604670f4dc132cdd6fd9cf2..adb37d62bb65bf117b2cbc372914ce7ab3c028ce 100644 (file)
@@ -23,10 +23,16 @@ basepath = os.path.join(heat.__path__[0], os.path.pardir)
 
 class CliTest(unittest.TestCase):
 
-    def test_bins(self):
-        bins = ['heat-cfn', 'heat-boto', 'heat-watch']
+    def test_heat_cfn(self):
+            self.bin_test_run('heat-cfn')
 
-        for bin in bins:
+    def test_heat_boto(self):
+            self.bin_test_run('heat-boto')
+
+    def test_heat_watch(self):
+            self.bin_test_run('heat-watch')
+
+    def bin_test_run(self, bin):
             fullpath = basepath + '/bin/' + bin
 
             proc = subprocess.Popen(fullpath,