jcholast's pull request #88: "test_plugable: update the rest of test_init" was 
opened

PR body:
"""
In commit ed4c2d9252a995d01dc098e5b761ded8cd9373d8, changes to the Plugin
class were made, but the test was updated only partially.

Update the rest to fix the failing test.

https://fedorahosted.org/freeipa/ticket/6313
"""

See the full pull-request at https://github.com/freeipa/freeipa/pull/88
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/88/head:pr88
git checkout pr88
From e336efd4394707756d5d7ef7dd87ca190fd42678 Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jchol...@redhat.com>
Date: Thu, 15 Sep 2016 14:38:49 +0200
Subject: [PATCH] test_plugable: update the rest of test_init

In commit ed4c2d9252a995d01dc098e5b761ded8cd9373d8, changes to the Plugin
class were made, but the test was updated only partially.

Update the rest to fix the failing test.

https://fedorahosted.org/freeipa/ticket/6313
---
 ipatests/test_ipalib/test_plugable.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ipatests/test_ipalib/test_plugable.py b/ipatests/test_ipalib/test_plugable.py
index 0ea02a7..f104c51 100644
--- a/ipatests/test_ipalib/test_plugable.py
+++ b/ipatests/test_ipalib/test_plugable.py
@@ -52,7 +52,7 @@ def test_init(self):
         api = 'the api instance'
         o = self.cls(api)
         assert o.name == 'Plugin'
-        assert isinstance(o.doc, text.Gettext)
+        assert isinstance(o.doc, str)
         class some_subclass(self.cls):
             """
             Do sub-classy things.
@@ -66,11 +66,12 @@ class some_subclass(self.cls):
         o = some_subclass(api)
         assert o.name == 'some_subclass'
         assert o.summary == 'Do sub-classy things.'
-        assert isinstance(o.doc, text.Gettext)
+        assert isinstance(o.doc, str)
         class another_subclass(self.cls):
             pass
         o = another_subclass(api)
-        assert o.summary == '<%s>' % o.fullname
+        assert o.summary == u'<%s.%s>' % (another_subclass.__module__,
+                                          another_subclass.__name__)
 
         # Test that Plugin makes sure the subclass hasn't defined attributes
         # whose names conflict with the logger methods set in Plugin.__init__():
-- 
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