PEP8: fix E711: comparison to None should be 'if cond is not None:'
[sfrench/samba-autobuild/.git] / python / samba / tests / pam_winbind.py
index 0f38469da0bff249c53be41e172830ce4631384d..68b05b30d7d3774e3e96eed8f1af6a0a6df4e04e 100644 (file)
@@ -20,6 +20,7 @@ import samba.tests
 import pypamtest
 import os
 
+
 class SimplePamTests(samba.tests.TestCase):
     def test_authenticate(self):
         domain = os.environ["DOMAIN"]
@@ -31,7 +32,7 @@ class SimplePamTests(samba.tests.TestCase):
         tc = pypamtest.TestCase(pypamtest.PAMTEST_AUTHENTICATE, expected_rc)
         res = pypamtest.run_pamtest(unix_username, "samba", [tc], [password])
 
-        self.assertTrue(res != None)
+        self.assertTrue(res is not None)
 
     def test_authenticate_error(self):
         domain = os.environ["DOMAIN"]
@@ -43,7 +44,7 @@ class SimplePamTests(samba.tests.TestCase):
         tc = pypamtest.TestCase(pypamtest.PAMTEST_AUTHENTICATE, expected_rc)
         res = pypamtest.run_pamtest(unix_username, "samba", [tc], [password])
 
-        self.assertTrue(res != None)
+        self.assertTrue(res is not None)
 
         # Authenticate again to check that we are not locked out with just one
         # failed login
@@ -53,4 +54,4 @@ class SimplePamTests(samba.tests.TestCase):
         tc = pypamtest.TestCase(pypamtest.PAMTEST_AUTHENTICATE, expected_rc)
         res = pypamtest.run_pamtest(unix_username, "samba", [tc], [password])
 
-        self.assertTrue(res != None)
+        self.assertTrue(res is not None)