def test_client_prop(host_url): """ Testing client property. """ client = LDAPClient(host_url) ref = LDAPReference(client, []) assert ref.client == client with pytest.raises(TypeError): ref.client = "b" ref.client = LDAPClient() assert ref.client != client
def test_client_prop(self): """ Testing client property. """ client = LDAPClient(self.url) ref = LDAPReference(client, []) self.assertEqual(ref.client, client) def error(): ref.client = "b" self.assertRaises(TypeError, error) ref.client = LDAPClient() self.assertNotEqual(ref.client, client)