import pypamtest
import os
+
class SimplePamTests(samba.tests.TestCase):
def test_authenticate(self):
domain = os.environ["DOMAIN"]
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"]
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
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)