diff options
author | 2014-11-29 23:19:37 -0500 | |
---|---|---|
committer | 2014-11-29 23:44:33 -0500 | |
commit | c84e88abaa0aff6bf7c41c2aea8ca09cf98cb4c2 (patch) | |
tree | a277b3bcf4253f8d3bcf07ecbee6e6dcd204e8e7 | |
parent | external.py: Converts all assertEquals calls to assertEqual (diff) | |
download | layman-c84e88abaa0aff6bf7c41c2aea8ca09cf98cb4c2.tar.gz layman-c84e88abaa0aff6bf7c41c2aea8ca09cf98cb4c2.tar.bz2 layman-c84e88abaa0aff6bf7c41c2aea8ca09cf98cb4c2.zip |
external.py: Improves success checking in AddDeleteEnableDisableFromDB
-rwxr-xr-x | layman/tests/external.py | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/layman/tests/external.py b/layman/tests/external.py index e20baaa..45b4d39 100755 --- a/layman/tests/external.py +++ b/layman/tests/external.py @@ -89,31 +89,20 @@ class AddDeleteEnableDisableFromDB(unittest.TestCase): # Add all the overlays in global_overlays.xml. for overlay in a.overlays.keys(): conf_success = conf.add(a.overlays[overlay]) - if False in conf_success: + if conf_success == False: success.append(False) else: success.append(True) # Disable one overlay. - conf_success = conf.disable(a.overlays['wrobel']) - if False in conf_success: - success.append(False) - else: - success.append(True) + self.assertTrue(conf.disable(a.overlays['wrobel'])) # Enable disabled overlay. - conf_success = conf.enable(a.overlays['wrobel']) - if False in conf_success: - success.append(False) - else: - success.append(True) + self.assertTrue(conf.enable(a.overlays['wrobel'])) + # Delete all the overlays in global_overlays.xml. for overlay in a.overlays.keys(): - conf_success = conf.delete(a.overlays[overlay]) - if False in conf_success: - success.append(False) - else: - success.append(True) + self.assertTrue(conf.delete(a.overlays[overlay])) # Clean up. os.unlink(makeconf) @@ -121,13 +110,6 @@ class AddDeleteEnableDisableFromDB(unittest.TestCase): shutil.rmtree(tmpdir) - if False in success: - success = False - else: - success = True - - self.assertTrue(success) - # Tests archive overlay types (squashfs, tar) # http://bugs.gentoo.org/show_bug.cgi?id=304547 |