Hi,

Both context.xmlclient and context.xmlclient_<id> need to be created
in order to successfully call the Command.forward method.

Tomas
From 4fdeb54c5c02e14a83c12637df5d33bb6d9f8122 Mon Sep 17 00:00:00 2001
From: Tomas Babej <tba...@redhat.com>
Date: Tue, 21 Jul 2015 17:38:06 +0200
Subject: [PATCH] tests: test_rpc: Create connection for the current thread

Both context.xmlclient and context.xmlclient_<id> need to be created
in order to successfully call the Command.forward method.
---
 ipatests/test_ipalib/test_rpc.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ipatests/test_ipalib/test_rpc.py b/ipatests/test_ipalib/test_rpc.py
index 74a7639c9eef27c93771bdbd235d03291423806e..b61337474075e661c4ddd1e7542ec6226455399d 100644
--- a/ipatests/test_ipalib/test_rpc.py
+++ b/ipatests/test_ipalib/test_rpc.py
@@ -229,6 +229,9 @@ class test_xmlclient(PluginTester):
             ),
 
         )
+
+        # Create connection for the current thread
+        setattr(context, o.id, Connection(conn, lambda: None))
         context.xmlclient = Connection(conn, lambda: None)
 
         # Test with a successful return value:
-- 
2.1.0

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to