diff options
author | Petr Viktorin <pviktori@redhat.com> | 2015-07-30 17:03:06 +0200 |
---|---|---|
committer | Tomas Babej <tbabej@redhat.com> | 2015-08-12 18:17:23 +0200 |
commit | 8b88caa110e83b42b1e43189c06b6cb3de712353 (patch) | |
tree | e891eabb97ab5722e1f3305e079a87d57941b3ed /ipatests/test_ipalib | |
parent | 27dabb45282911e375336f75934af9dd6cc5d963 (diff) | |
download | freeipa-8b88caa110e83b42b1e43189c06b6cb3de712353.tar.gz freeipa-8b88caa110e83b42b1e43189c06b6cb3de712353.tar.xz freeipa-8b88caa110e83b42b1e43189c06b6cb3de712353.zip |
Modernize function and method attribute names
Python 3 uses double-underscored names for internal function attributes.
In Python 2.7, these names exist as aliases to the old 'func_*' and
'im_*' names.
Reviewed-By: Tomas Babej <tbabej@redhat.com>
Diffstat (limited to 'ipatests/test_ipalib')
-rw-r--r-- | ipatests/test_ipalib/test_frontend.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ipatests/test_ipalib/test_frontend.py b/ipatests/test_ipalib/test_frontend.py index 3ca03c39b..76f500fe2 100644 --- a/ipatests/test_ipalib/test_frontend.py +++ b/ipatests/test_ipalib/test_frontend.py @@ -642,7 +642,7 @@ class test_Command(ClassChecker): (api, home) = create_test_api(in_server=True) api.finalize() o = my_cmd(api) - assert o.run.im_func is self.cls.run.im_func + assert o.run.__func__ is self.cls.run.__func__ out = o.run(*args, **kw) assert ('execute', args, kw) == out @@ -650,7 +650,7 @@ class test_Command(ClassChecker): (api, home) = create_test_api(in_server=False) api.finalize() o = my_cmd(api) - assert o.run.im_func is self.cls.run.im_func + assert o.run.__func__ is self.cls.run.__func__ assert ('forward', args, kw) == o.run(*args, **kw) def test_messages(self): @@ -682,14 +682,14 @@ class test_Command(ClassChecker): (api, home) = create_test_api(in_server=True) api.finalize() o = my_cmd(api) - assert o.run.im_func is self.cls.run.im_func + assert o.run.__func__ is self.cls.run.__func__ assert {'name': 'execute', 'messages': expected} == o.run(*args, **kw) # Test in non-server context (api, home) = create_test_api(in_server=False) api.finalize() o = my_cmd(api) - assert o.run.im_func is self.cls.run.im_func + assert o.run.__func__ is self.cls.run.__func__ assert {'name': 'forward', 'messages': expected} == o.run(*args, **kw) def test_validate_output_basic(self): |