tests:samba_tool: make use of assertCmdFail() in gpo.py
authorStefan Metzmacher <metze@samba.org>
Tue, 2 Aug 2016 10:35:38 +0000 (12:35 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 4 Aug 2016 16:26:06 +0000 (18:26 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12108

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
python/samba/tests/samba_tool/gpo.py

index cd22706a3203e55e5ce36fa68a6d2d3ea63f6a9f..6297e1a03f80b75014fea728ca5345b11c3706d5 100644 (file)
@@ -35,7 +35,7 @@ class GpoCmdTestCase(SambaToolCmdTest):
     def test_fetchfail(self):
         """Run against a non-existent GPO, and make sure it fails (this hard-coded UUID is very unlikely to exist"""
         (result, out, err) = self.runsubcmd("gpo", "fetch", "c25cac17-a02a-4151-835d-fae17446ee43", "-H", "ldap://%s" % os.environ["SERVER"])
-        self.assertEquals(result, -1, "check for result code")
+        self.assertCmdFail(result, "check for result code")
 
     def test_fetch(self):
         """Run against a real GPO, and make sure it passes"""