def test_AD_tls(self): self.assertEqual( configTool.connect_ldap_server(self.AD_server_tls, None, self.AD_user, self.AD_pass, 'y', self.AD_server_tls_path)['message'], "Successfully connected!")
def test_connect_good_host_name(self): self.assertEqual( configTool.connect_ldap_server(self.good_host_name, None, "", "", 'n', "")['message'], "Successfully connected!")
def test_bad_password(self): self.assertEqual( configTool.connect_ldap_server(self.AD_server, None, self.AD_user, self.bad_password, 'n', "")['message'], "Failed to bind to socket (Invalid Log in credentials)")
def test_connect_bad_host(self): self.assertEqual( configTool.connect_ldap_server(self.bad_host, None, "", "", 'n', "")['message'], "Failed to connect due to invalid socket.")
def test_connect_bad_port(self): self.assertEqual( configTool.connect_ldap_server(self.good_host_name, self.bad_port, "", "", 'n', "")['message'], "Invalid Port")
def test_connect_bad_host(self): self.assertEqual(configTool.connect_ldap_server(self.bad_host, None, "", "", 'n', "")['message'], "Failed to connect due to invalid socket.")
def test_AD_tls(self): self.assertEqual(configTool.connect_ldap_server(self.AD_server_tls, None, self.AD_user, self.AD_pass, 'y', self.AD_server_tls_path)['message'], "Successfully connected!")
def test_bad_password(self): self.assertEqual(configTool.connect_ldap_server(self.AD_server, None, self.AD_user, self.bad_password, 'n', "")['message'], "Failed to bind to socket (Invalid Log in credentials)")
def test_connect_good_host_name(self): self.assertEqual(configTool.connect_ldap_server(self.good_host_name, None, "", "", 'n', "")['message'], "Successfully connected!")
def test_connect_bad_port(self): self.assertEqual(configTool.connect_ldap_server(self.good_host_name, self.bad_port, "", "", 'n', "")['message'], "Invalid Port")