Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ==================================== test session starts =====================================
- platform linux2 -- Python 2.7.12, pytest-2.9.2, py-1.4.31, pluggy-0.3.1
- rootdir: /usr/lib/python2.7/site-packages/ipatests, inifile: pytest.ini
- plugins: sourceorder-0.5, multihost-1.0
- collected 2575 items
- test_cmdline/test_cli.py ..............
- test_cmdline/test_help.py ......
- test_cmdline/test_ipagetkeytab.py .....ssssssss
- test_install/test_updates.py sssssssssss
- test_ipalib/test_aci.py ...................
- test_ipalib/test_backend.py .......F
- test_ipalib/test_base.py ...............
- test_ipalib/test_capabilities.py .
- test_ipalib/test_cli.py ...
- test_ipalib/test_config.py ............
- test_ipalib/test_crud.py FFFFFFFFFF.....
- test_ipalib/test_errors.py .......
- test_ipalib/test_frontend.py ................F...F.FF.....F..FF.F....
- test_ipalib/test_messages.py ....
- test_ipalib/test_output.py ...
- test_ipalib/test_parameters.py ......F......................................................
- test_ipalib/test_plugable.py ....FFF
- test_ipalib/test_rpc.py .....F........
- test_ipalib/test_text.py .............................
- test_ipalib/test_x509.py ...
- test_ipapython/test_cookie.py ............
- test_ipapython/test_dn.py ...........................
- test_ipapython/test_dnssec.py .
- test_ipapython/test_ipap11helper.py ...............
- test_ipapython/test_ipautil.py ..................................................................
- test_ipapython/test_ipavalidate.py ..........
- test_ipapython/test_kerberos.py ..............
- test_ipapython/test_keyring.py ..........
- test_ipapython/test_secrets.py .
- test_ipapython/test_ssh.py ...............................
- test_ipaserver/test_changepw.py ....
- test_ipaserver/test_ldap.py ..ss..............
- test_ipaserver/test_otptoken_import.py sssssssss
- test_ipaserver/test_rpcserver.py .......FF
- test_ipaserver/test_serverroles.py .................................................
- test_ipaserver/test_topology_plugin.py s
- test_ipaserver/test_version_comparison.py ............
- test_ipaserver/test_install/test_adtrustinstance.py ..
- test_ipaserver/test_install/test_service.py .
- test_xmlrpc/test_add_remove_cert_cmd.py .......................................
- test_xmlrpc/test_attr.py ...............................
- test_xmlrpc/test_automember_plugin.py ..............................
- test_xmlrpc/test_automount_plugin.py ......................................
- test_xmlrpc/test_baseldap_plugin.py ....
- test_xmlrpc/test_batch_plugin.py ......
- test_xmlrpc/test_ca_plugin.py ...............
- test_xmlrpc/test_caacl_plugin.py ....................
- test_xmlrpc/test_caacl_profile_enforcement.py .............................................................
- test_xmlrpc/test_cert_plugin.py .........................................
- test_xmlrpc/test_certprofile_plugin.py ..................
- test_xmlrpc/test_config_plugin.py ..................
- test_xmlrpc/test_delegation_plugin.py .................
- test_xmlrpc/test_dns_plugin.py .......................................................................................................................................................................................................................................................................................F.FF.F.F.FF....................................
- test_xmlrpc/test_dns_realmdomains_integration.py ...
- test_xmlrpc/test_external_members.py sssss
- test_xmlrpc/test_group_plugin.py .....................................................
- test_xmlrpc/test_hbac_plugin.py ....................................
- test_xmlrpc/test_hbacsvcgroup_plugin.py ...............
- test_xmlrpc/test_hbactest_plugin.py ........
- test_xmlrpc/test_host_plugin.py .........................................
- test_xmlrpc/test_hostgroup_plugin.py .............
- test_xmlrpc/test_idviews_plugin.py ...................................................................................
- test_xmlrpc/test_kerberos_principal_aliases.py ...............
- test_xmlrpc/test_krbtpolicy.py ......
- test_xmlrpc/test_location_plugin.py .........................................
- test_xmlrpc/test_nesting.py .......
- test_xmlrpc/test_netgroup_plugin.py .......................................................
- test_xmlrpc/test_old_permission_plugin.py .............................................................
- test_xmlrpc/test_passwd_plugin.py ...
- test_xmlrpc/test_permission_plugin.py ...............................................................................................................................................................................................................................................................................
- test_xmlrpc/test_ping_plugin.py ...
- test_xmlrpc/test_privilege_plugin.py .......................
- test_xmlrpc/test_pwpolicy_plugin.py ..................
- test_xmlrpc/test_radiusproxy_plugin.py ...................................
- test_xmlrpc/test_range_plugin.py ................................
- test_xmlrpc/test_realmdomains_plugin.py .............
- test_xmlrpc/test_replace.py .......
- test_xmlrpc/test_role_plugin.py ........................................
- test_xmlrpc/test_selfservice_plugin.py ..................
- test_xmlrpc/test_selinuxusermap_plugin.py ............................................................
- test_xmlrpc/test_service_plugin.py .................................................................
- test_xmlrpc/test_servicedelegation_plugin.py ...........................
- test_xmlrpc/test_stageuser_plugin.py .............................................................................
- test_xmlrpc/test_sudocmd_plugin.py ..............
- test_xmlrpc/test_sudocmdgroup_plugin.py ...................
- test_xmlrpc/test_sudorule_plugin.py ..................................................
- test_xmlrpc/test_trust_plugin.py sssssss
- test_xmlrpc/test_user_plugin.py ......................................................................
- test_xmlrpc/test_vault_plugin.py sssssssssssssssssssssssssssssssssssssss
- test_xmlrpc/xmlrpc_test.py .
- ========================================== FAILURES ==========================================
- _______________________________ test_Executioner.test_execute ________________________________
- self = <ipatests.test_ipalib.test_backend.test_Executioner object at 0x7fce038f8ed0>
- def test_execute(self):
- """
- Test the `ipalib.backend.Executioner.execute` method.
- """
- > api, _home = create_test_api(in_server=True)
- test_ipalib/test_backend.py:192:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- util.py:523: in create_test_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- _________________________________ test_Create.test_get_args __________________________________
- self = <ipatests.test_ipalib.test_crud.test_Create object at 0x7fce038c2f10>
- def test_get_args(self):
- """
- Test the `ipalib.crud.Create.get_args` method.
- """
- > api = self.get_api()
- test_ipalib/test_crud.py:70:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- test_ipalib/test_crud.py:41: in get_api
- api, _home = get_api()
- util.py:508: in get_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- ________________________________ test_Create.test_get_options ________________________________
- self = <ipatests.test_ipalib.test_crud.test_Create object at 0x7fce02035a50>
- def test_get_options(self):
- """
- Test the `ipalib.crud.Create.get_options` method.
- """
- > api = self.get_api()
- test_ipalib/test_crud.py:78:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- test_ipalib/test_crud.py:41: in get_api
- api, _home = get_api()
- util.py:508: in get_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- _________________________________ test_Update.test_get_args __________________________________
- self = <ipatests.test_ipalib.test_crud.test_Update object at 0x7fce02175e50>
- def test_get_args(self):
- """
- Test the `ipalib.crud.Update.get_args` method.
- """
- > api = self.get_api()
- test_ipalib/test_crud.py:101:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- test_ipalib/test_crud.py:41: in get_api
- api, _home = get_api()
- util.py:508: in get_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- ________________________________ test_Update.test_get_options ________________________________
- self = <ipatests.test_ipalib.test_crud.test_Update object at 0x7fce038c22d0>
- def test_get_options(self):
- """
- Test the `ipalib.crud.Update.get_options` method.
- """
- > api = self.get_api()
- test_ipalib/test_crud.py:109:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- test_ipalib/test_crud.py:41: in get_api
- api, _home = get_api()
- util.py:508: in get_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- ________________________________ test_Retrieve.test_get_args _________________________________
- self = <ipatests.test_ipalib.test_crud.test_Retrieve object at 0x7fce03b55410>
- def test_get_args(self):
- """
- Test the `ipalib.crud.Retrieve.get_args` method.
- """
- > api = self.get_api()
- test_ipalib/test_crud.py:130:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- test_ipalib/test_crud.py:41: in get_api
- api, _home = get_api()
- util.py:508: in get_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- _______________________________ test_Retrieve.test_get_options _______________________________
- self = <ipatests.test_ipalib.test_crud.test_Retrieve object at 0x7fce02043fd0>
- def test_get_options(self):
- """
- Test the `ipalib.crud.Retrieve.get_options` method.
- """
- > api = self.get_api()
- test_ipalib/test_crud.py:138:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- test_ipalib/test_crud.py:41: in get_api
- api, _home = get_api()
- util.py:508: in get_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- _________________________________ test_Delete.test_get_args __________________________________
- self = <ipatests.test_ipalib.test_crud.test_Delete object at 0x7fce020ce810>
- def test_get_args(self):
- """
- Test the `ipalib.crud.Delete.get_args` method.
- """
- > api = self.get_api()
- test_ipalib/test_crud.py:153:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- test_ipalib/test_crud.py:41: in get_api
- api, _home = get_api()
- util.py:508: in get_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- ________________________________ test_Delete.test_get_options ________________________________
- self = <ipatests.test_ipalib.test_crud.test_Delete object at 0x7fce0389c0d0>
- def test_get_options(self):
- """
- Test the `ipalib.crud.Delete.get_options` method.
- """
- > api = self.get_api()
- test_ipalib/test_crud.py:161:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- test_ipalib/test_crud.py:41: in get_api
- api, _home = get_api()
- util.py:508: in get_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- _________________________________ test_Search.test_get_args __________________________________
- self = <ipatests.test_ipalib.test_crud.test_Search object at 0x7fce02035e10>
- def test_get_args(self):
- """
- Test the `ipalib.crud.Search.get_args` method.
- """
- > api = self.get_api()
- test_ipalib/test_crud.py:177:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- test_ipalib/test_crud.py:41: in get_api
- api, _home = get_api()
- util.py:508: in get_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- ________________________________ test_Search.test_get_options ________________________________
- self = <ipatests.test_ipalib.test_crud.test_Search object at 0x7fce038c2b50>
- def test_get_options(self):
- """
- Test the `ipalib.crud.Search.get_options` method.
- """
- > api = self.get_api()
- test_ipalib/test_crud.py:185:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- test_ipalib/test_crud.py:41: in get_api
- api, _home = get_api()
- util.py:508: in get_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- __________________________ test_Command.test_default_from_chaining ___________________________
- self = <ipatests.test_ipalib.test_frontend.test_Command object at 0x7fce03885490>
- def test_default_from_chaining(self):
- """
- Test chaining of parameters through default_from.
- """
- class my_cmd(self.cls):
- takes_options = (
- Str('option0'),
- Str('option1', default_from=lambda option0: option0),
- Str('option2', default_from=lambda option1: option1),
- )
- def run(self, *args, **options):
- return dict(result=options)
- kw = dict(option0=u'some value')
- > api, _home = create_test_api()
- test_ipalib/test_frontend.py:460:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- util.py:523: in create_test_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- ___________________________ test_Command.test_args_options_2_entry ___________________________
- self = <ipatests.test_ipalib.test_frontend.test_Command object at 0x7fce038a21d0>
- def test_args_options_2_entry(self):
- """
- Test `ipalib.frontend.Command.args_options_2_entry` method.
- """
- class my_cmd(self.cls):
- takes_args = (
- parameters.Str('one', attribute=True),
- parameters.Str('two', attribute=False),
- )
- takes_options = (
- parameters.Str('three', attribute=True, multivalue=True),
- parameters.Str('four', attribute=True, multivalue=False),
- )
- def run(self, *args, **kw):
- return self.args_options_2_entry(*args, **kw)
- args = ('one', 'two')
- kw = dict(three=('three1', 'three2'), four='four')
- > api, _home = create_test_api()
- test_ipalib/test_frontend.py:584:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- util.py:523: in create_test_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- ___________________________________ test_Command.test_run ____________________________________
- self = <ipatests.test_ipalib.test_frontend.test_Command object at 0x7fce0207e290>
- def test_run(self):
- """
- Test the `ipalib.frontend.Command.run` method.
- """
- class my_cmd(self.cls):
- def execute(self, *args, **kw):
- return ('execute', args, kw)
- def forward(self, *args, **kw):
- return ('forward', args, kw)
- args = ('Hello,', 'world,')
- kw = dict(how_are='you', on_this='fine day?', version=API_VERSION)
- # Test in server context:
- > api, _home = create_test_api(in_server=True)
- test_ipalib/test_frontend.py:623:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- util.py:523: in create_test_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- _________________________________ test_Command.test_messages _________________________________
- self = <ipatests.test_ipalib.test_frontend.test_Command object at 0x7fce03882cd0>
- def test_messages(self):
- """
- Test correct handling of messages
- """
- class TestMessage(messages.PublicMessage):
- type = 'info'
- format = 'This is a message.'
- errno = 1234
- class my_cmd(self.cls):
- def execute(self, *args, **kw):
- result = {'name': 'execute'}
- messages.add_message(kw['version'], result, TestMessage())
- return result
- def forward(self, *args, **kw):
- result = {'name': 'forward'}
- messages.add_message(kw['version'], result, TestMessage())
- return result
- args = ('Hello,', 'world,')
- kw = dict(how_are='you', on_this='fine day?', version=API_VERSION)
- expected = [TestMessage().to_dict()]
- # Test in server context:
- > api, _home = create_test_api(in_server=True)
- test_ipalib/test_frontend.py:669:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- util.py:523: in create_test_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- ________________________________ test_LocalOrRemote.test_run _________________________________
- self = <ipatests.test_ipalib.test_frontend.test_LocalOrRemote object at 0x7fce020436d0>
- def test_run(self):
- """
- Test the `ipalib.frontend.LocalOrRemote.run` method.
- """
- class example(self.cls):
- takes_args = 'key?'
- def forward(self, *args, **options):
- return dict(result=('forward', args, options))
- def execute(self, *args, **options):
- return dict(result=('execute', args, options))
- # Test when in_server=False:
- > api, _home = create_test_api(in_server=False)
- test_ipalib/test_frontend.py:860:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- util.py:523: in create_test_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- ________________________________ test_Object.test_primary_key ________________________________
- self = <ipatests.test_ipalib.test_frontend.test_Object object at 0x7fce0207e350>
- def test_primary_key(self):
- """
- Test the `ipalib.frontend.Object.primary_key` attribute.
- """
- > api, _home = create_test_api()
- test_ipalib/test_frontend.py:1002:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- util.py:523: in create_test_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- __________________________________ test_Object.test_backend __________________________________
- self = <ipatests.test_ipalib.test_frontend.test_Object object at 0x7fce038c2bd0>
- def test_backend(self):
- """
- Test the `ipalib.frontend.Object.backend` attribute.
- """
- > api, _home = create_test_api()
- test_ipalib/test_frontend.py:1048:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- util.py:523: in create_test_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- _______________________________ test_Object.test_params_minus ________________________________
- self = <ipatests.test_ipalib.test_frontend.test_Object object at 0x7fce02035ad0>
- def test_params_minus(self):
- """
- Test the `ipalib.frontend.Object.params_minus` method.
- """
- class example(self.cls):
- takes_params = ('one', 'two', 'three', 'four')
- > api, _home = create_test_api()
- test_ipalib/test_frontend.py:1080:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- util.py:523: in create_test_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- _______________________________ test_Param.test_use_in_context _______________________________
- self = <ipatests.test_ipalib.test_parameters.test_Param object at 0x7fce0389cc90>
- def test_use_in_context(self):
- """
- Test the `ipalib.parameters.Param.use_in_context` method.
- """
- set1 = ('one', 'two', 'three')
- set2 = ('four', 'five', 'six')
- param1 = self.cls('param1')
- param2 = self.cls('param2', include=set1)
- param3 = self.cls('param3', exclude=set2)
- for context in set1:
- env = config.Env()
- > env.context = context
- test_ipalib/test_parameters.py:321:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- ../ipalib/config.py:191: in __setattr__
- self[name] = value
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <ipalib.config.Env object at 0x7fce0389c7d0>, key = 'context', value = 'one'
- def __setitem__(self, key, value):
- """
- Set ``key`` to ``value``.
- """
- check_name(key)
- if key in self.__d:
- raise AttributeError(OVERRIDE_ERROR %
- > (self.__class__.__name__, key, self.__d[key], value)
- )
- E AttributeError: cannot override Env.context value u'default' with 'one'
- ../ipalib/config.py:200: AttributeError
- _____________________________________ test_API.test_API ______________________________________
- self = <ipatests.test_ipalib.test_plugable.test_API object at 0x7fce03883c50>
- def test_API(self):
- """
- Test the `ipalib.plugable.API` class.
- """
- assert issubclass(plugable.API, plugable.ReadOnly)
- # Setup the test bases, create the API:
- class base0(plugable.Plugin):
- def method(self, n):
- return n
- class base1(plugable.Plugin):
- def method(self, n):
- return n + 1
- class API(plugable.API):
- bases = (base0, base1)
- modules = ()
- api = API()
- > api.env.mode = 'unit_test'
- E AttributeError: 'API' object has no attribute 'env'
- test_ipalib/test_plugable.py:185: AttributeError
- __________________________________ test_API.test_bootstrap ___________________________________
- self = <ipatests.test_ipalib.test_plugable.test_API object at 0x7fce03883f10>
- def test_bootstrap(self):
- """
- Test the `ipalib.plugable.API.bootstrap` method.
- """
- > o, _home = create_test_api()
- test_ipalib/test_plugable.py:251:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- util.py:523: in create_test_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- _________________________________ test_API.test_load_plugins _________________________________
- self = <ipatests.test_ipalib.test_plugable.test_API object at 0x7fce038a6a10>
- def test_load_plugins(self):
- """
- Test the `ipalib.plugable.API.load_plugins` method.
- """
- > o, _home = create_test_api()
- test_ipalib/test_plugable.py:267:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- util.py:523: in create_test_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- ________________________________ test_xmlclient.test_forward _________________________________
- self = <ipatests.test_ipalib.test_rpc.test_xmlclient object at 0x7fce038a6d90>
- def test_forward(self):
- """
- Test the `ipalib.rpc.xmlclient.forward` method.
- """
- class user_add(Command):
- pass
- > o, _api, _home = self.instance('Backend', user_add, in_server=False)
- test_ipalib/test_rpc.py:213:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- util.py:561: in instance
- (api, home) = self.finalize(*plugins, **kw)
- util.py:556: in finalize
- (api, home) = self.register(*plugins, **kw)
- util.py:549: in register
- (api, home) = create_test_api(**kw)
- util.py:523: in create_test_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- ../ipalib/__init__.py:947: AttributeError
- ___________________________ test_xmlserver.test_marshaled_dispatch ___________________________
- self = <ipatests.test_ipaserver.test_rpcserver.test_xmlserver object at 0x7fce0373ef50>
- def test_marshaled_dispatch(self): # FIXME
- > self.instance('Backend', in_server=True)
- /usr/lib/python2.7/site-packages/ipatests/test_ipaserver/test_rpcserver.py:197:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- /usr/lib/python2.7/site-packages/ipatests/util.py:561: in instance
- (api, home) = self.finalize(*plugins, **kw)
- /usr/lib/python2.7/site-packages/ipatests/util.py:556: in finalize
- (api, home) = self.register(*plugins, **kw)
- /usr/lib/python2.7/site-packages/ipatests/util.py:549: in register
- (api, home) = create_test_api(**kw)
- /usr/lib/python2.7/site-packages/ipatests/util.py:523: in create_test_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- /usr/lib/python2.7/site-packages/ipalib/__init__.py:947: AttributeError
- _______________________________ test_jsonserver.test_unmarshal _______________________________
- self = <ipatests.test_ipaserver.test_rpcserver.test_jsonserver object at 0x7fce03551050>
- def test_unmarshal(self):
- """
- Test the `ipaserver.rpcserver.jsonserver.unmarshal` method.
- """
- > o, _api, _home = self.instance('Backend', in_server=True)
- /usr/lib/python2.7/site-packages/ipatests/test_ipaserver/test_rpcserver.py:211:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- /usr/lib/python2.7/site-packages/ipatests/util.py:561: in instance
- (api, home) = self.finalize(*plugins, **kw)
- /usr/lib/python2.7/site-packages/ipatests/util.py:556: in finalize
- (api, home) = self.register(*plugins, **kw)
- /usr/lib/python2.7/site-packages/ipatests/util.py:549: in register
- (api, home) = create_test_api(**kw)
- /usr/lib/python2.7/site-packages/ipatests/util.py:523: in create_test_api
- api = ipalib.create_api(mode='unit_test')
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- mode = 'unit_test'
- def create_api(mode='dummy'):
- """
- Return standard `plugable.API` instance.
- This standard instance allows plugins that subclass from the following
- base classes:
- - `frontend.Command`
- - `frontend.Object`
- - `frontend.Method`
- - `backend.Backend`
- """
- api = API()
- if mode is not None:
- > api.env.mode = mode
- E AttributeError: 'API' object has no attribute 'env'
- /usr/lib/python2.7/site-packages/ipalib/__init__.py:947: AttributeError
- test_forwardzone_delegation_warnings.test_command[0007: dnsrecord_add: Delegate zone u'fw.sub.dnszone.test.' from zone u'sub.dnszone.test.' using NS record]
- self = <ipatests.test_xmlrpc.test_dns_plugin.test_forwardzone_delegation_warnings object at 0x7fce013e6b10>
- index = 7
- declarative_test_definition = {'command': ('dnsrecord_add', ['sub.dnszone.test.', 'fw'], {'nsrecord': 'vm-025.abc.idm.lab.eng.brq.redhat.com.', 'ver...}, 'nice': "0007: dnsrecord_add: Delegate zone u'fw.sub.dnszone.test.' from zone u'sub.dnszone.test.' using NS record"}
- def test_command(self, index, declarative_test_definition):
- """Run an individual test
- The arguments are provided by the pytest plugin.
- """
- if callable(declarative_test_definition):
- declarative_test_definition(self)
- else:
- > self.check(**declarative_test_definition)
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:318:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:330: in check
- self.check_output(nice, cmd, args, options, expected, extra_check)
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:378: in check_output
- got = api.Command[cmd](*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:447: in __call__
- return self.__do_call(*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:475: in __do_call
- ret = self.run(*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:799: in run
- return self.forward(*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:822: in forward
- *args, **kw)
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:990: in forward
- return self._call_command(command, params)
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:971: in _call_command
- return command(*params)
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:1121: in _call
- return self.__request(name, args)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <ipalib.rpc.JSONServerProxy object at 0x7fce013e6150>, name = 'dnsrecord_add/1'
- args = ((<DNS name sub.dnszone.test.>, <DNS name fw>), {'nsrecord': ('vm-025.abc.idm.lab.eng.brq.redhat.com.',), 'version': '2.216'})
- def __request(self, name, args):
- payload = {'method': unicode(name), 'params': args, 'id': 0}
- version = args[1].get('version', VERSION_WITHOUT_CAPABILITIES)
- payload = json_encode_binary(payload, version)
- if self.__verbose >= 2:
- root_logger.info('Request: %s',
- json.dumps(payload, sort_keys=True, indent=4))
- response = self.__transport.request(
- self.__host,
- self.__handler,
- json.dumps(payload).encode('utf-8'),
- verbose=self.__verbose >= 3,
- )
- try:
- response = json_decode_binary(json.loads(response.decode('ascii')))
- except ValueError as e:
- raise JSONError(error=str(e))
- if self.__verbose >= 2:
- root_logger.info(
- 'Response: %s',
- json.dumps(json_encode_binary(response, version),
- sort_keys=True, indent=4)
- )
- error = response.get('error')
- if error:
- try:
- error_class = errors_by_code[error['code']]
- except KeyError:
- raise UnknownError(
- code=error.get('code'),
- error=error.get('message'),
- server=self.__host,
- )
- else:
- kw = error.get('data', {})
- kw['message'] = error['message']
- > raise error_class(**kw)
- E NotFound: Nameserver 'vm-025.abc.idm.lab.eng.brq.redhat.com.' does not have a corresponding A/AAAA record
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:1115: NotFound
- test_forwardzone_delegation_warnings.test_command[0009: dnszone_enable: Enable zone u'sub.dnszone.test.']
- self = <ipatests.test_xmlrpc.test_dns_plugin.test_forwardzone_delegation_warnings object at 0x7fce013b1110>
- index = 9
- declarative_test_definition = {'command': ('dnszone_enable', ['sub.dnszone.test.'], {'version': '2.216'}), 'desc': "Enable zone u'sub.dnszone.test.'...zone.test."', 'value': <DNS name sub.dnszone.test.>}, 'nice': "0009: dnszone_enable: Enable zone u'sub.dnszone.test.'"}
- def test_command(self, index, declarative_test_definition):
- """Run an individual test
- The arguments are provided by the pytest plugin.
- """
- if callable(declarative_test_definition):
- declarative_test_definition(self)
- else:
- > self.check(**declarative_test_definition)
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:318:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:330: in check
- self.check_output(nice, cmd, args, options, expected, extra_check)
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:379: in check_output
- assert_deepequal(expected, got, nice)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- expected = {'result': True, 'summary': 'Enabled DNS zone "sub.dnszone.test."', 'value': <DNS name sub.dnszone.test.>}
- got = {'messages': ({'code': 13008, 'data': {'authzone': 'sub.dnszone.test.', 'fwzone': 'fw.sub.dnszone.test.', 'ns_rec': 'f...ing', ...},), 'result': True, 'summary': 'Enabled DNS zone "sub.dnszone.test."', 'value': <DNS name sub.dnszone.test.>}
- doc = "0009: dnszone_enable: Enable zone u'sub.dnszone.test.'", stack = ()
- def assert_deepequal(expected, got, doc='', stack=tuple()):
- """
- Recursively check for type and equality.
- If a value in expected is callable then it will used as a callback to
- test for equality on the got value. The callback is passed the got
- value and returns True if equal, False otherwise.
- If the tests fails, it will raise an ``AssertionError`` with detailed
- information, including the path to the offending value. For example:
- >>> expected = [u'Hello', dict(world=u'how are you?')]
- >>> got = [u'Hello', dict(world='how are you?')]
- >>> expected == got
- True
- >>> assert_deepequal(expected, got, doc='Testing my nested data')
- Traceback (most recent call last):
- ...
- AssertionError: assert_deepequal: type(expected) is not type(got).
- Testing my nested data
- type(expected) = <type 'unicode'>
- type(got) = <type 'str'>
- expected = u'how are you?'
- got = 'how are you?'
- path = (0, 'world')
- Note that lists and tuples are considered equivalent, and the order of
- their elements does not matter.
- """
- try:
- pretty_print = pytest.config.getoption("pretty_print") # pylint: disable=no-member
- except AttributeError:
- pretty_print = False
- if pretty_print:
- expected_str = struct_to_string(expected, EXPECTED_LEN)
- got_str = struct_to_string(got, GOT_LEN)
- else:
- expected_str = repr(expected)
- got_str = repr(got)
- if isinstance(expected, tuple):
- expected = list(expected)
- if isinstance(got, tuple):
- got = list(got)
- if isinstance(expected, DN):
- if isinstance(got, six.string_types):
- got = DN(got)
- if not (isinstance(expected, Fuzzy) or callable(expected) or type(expected) is type(got)):
- raise AssertionError(
- TYPE % (doc, type(expected), type(got), expected, got, stack)
- )
- if isinstance(expected, (list, tuple)):
- if len(expected) != len(got):
- raise AssertionError(
- LEN % (doc, len(expected), len(got), expected_str, got_str,
- stack)
- )
- # Sort list elements, unless they are dictionaries
- if expected and isinstance(expected[0], dict):
- s_got = got
- s_expected = expected
- else:
- try:
- s_got = sorted(got)
- except TypeError:
- s_got = got
- try:
- s_expected = sorted(expected)
- except TypeError:
- s_expected = expected
- for (i, e_sub) in enumerate(s_expected):
- g_sub = s_got[i]
- assert_deepequal(e_sub, g_sub, doc, stack + (i,))
- elif isinstance(expected, dict):
- missing = set(expected).difference(got)
- extra = set(got).difference(expected)
- if missing or extra:
- raise AssertionError(KEYS % (
- doc, sorted(missing), sorted(extra), expected_str, got_str,
- > stack)
- )
- E AssertionError: assert_deepequal: dict keys mismatch.
- E 0009: dnszone_enable: Enable zone u'sub.dnszone.test.'
- E missing keys = []
- E extra keys = [u'messages']
- E expected = {'result': True,
- E 'summary': u'Enabled DNS zone "sub.dnszone.test."',
- E 'value': <DNS name sub.dnszone.test.>}
- E got = {u'messages': ({u'code': 13008,
- E u'data': {u'authzone': u'sub.dnszone.test.',
- E u'fwzone': u'fw.sub.dnszone.test.',
- E u'ns_rec': u'fw'},
- E u'message': u'forward zone "fw.sub.dnszone.test." is not effective because of missing proper NS delegation in authoritative zone "sub.dnszone.test.". Please add NS record "fw" to parent zone "sub.dnszone.test.".',
- E u'name': u'ForwardzoneIsNotEffectiveWarning',
- E u'type': u'warning'},),
- E u'result': True,
- E u'summary': u'Enabled DNS zone "sub.dnszone.test."',
- E u'value': <DNS name sub.dnszone.test.>}
- E path = ()
- /usr/lib/python2.7/site-packages/ipatests/util.py:384: AssertionError
- test_forwardzone_delegation_warnings.test_command[0010: dnsrecord_del: Delete NS record which delegates zone u'fw.sub.dnszone.test.' from zone u'sub.dnszone.test.' (expected warning for u'fw.sub.dnszone.test.')]
- self = <ipatests.test_xmlrpc.test_dns_plugin.test_forwardzone_delegation_warnings object at 0x7fce013e6610>
- index = 10
- declarative_test_definition = {'command': ('dnsrecord_del', ['sub.dnszone.test.', 'fw'], {'del_all': True, 'version': '2.216'}), 'desc': "Delete NS ... delegates zone u'fw.sub.dnszone.test.' from zone u'sub.dnszone.test.' (expected warning for u'fw.sub.dnszone.test.')"}
- def test_command(self, index, declarative_test_definition):
- """Run an individual test
- The arguments are provided by the pytest plugin.
- """
- if callable(declarative_test_definition):
- declarative_test_definition(self)
- else:
- > self.check(**declarative_test_definition)
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:318:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:330: in check
- self.check_output(nice, cmd, args, options, expected, extra_check)
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:378: in check_output
- got = api.Command[cmd](*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:447: in __call__
- return self.__do_call(*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:475: in __do_call
- ret = self.run(*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:799: in run
- return self.forward(*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:822: in forward
- *args, **kw)
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:990: in forward
- return self._call_command(command, params)
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:971: in _call_command
- return command(*params)
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:1121: in _call
- return self.__request(name, args)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <ipalib.rpc.JSONServerProxy object at 0x7fce013e6150>, name = 'dnsrecord_del/1'
- args = ((<DNS name sub.dnszone.test.>, <DNS name fw>), {'del_all': True, 'version': '2.216'})
- def __request(self, name, args):
- payload = {'method': unicode(name), 'params': args, 'id': 0}
- version = args[1].get('version', VERSION_WITHOUT_CAPABILITIES)
- payload = json_encode_binary(payload, version)
- if self.__verbose >= 2:
- root_logger.info('Request: %s',
- json.dumps(payload, sort_keys=True, indent=4))
- response = self.__transport.request(
- self.__host,
- self.__handler,
- json.dumps(payload).encode('utf-8'),
- verbose=self.__verbose >= 3,
- )
- try:
- response = json_decode_binary(json.loads(response.decode('ascii')))
- except ValueError as e:
- raise JSONError(error=str(e))
- if self.__verbose >= 2:
- root_logger.info(
- 'Response: %s',
- json.dumps(json_encode_binary(response, version),
- sort_keys=True, indent=4)
- )
- error = response.get('error')
- if error:
- try:
- error_class = errors_by_code[error['code']]
- except KeyError:
- raise UnknownError(
- code=error.get('code'),
- error=error.get('message'),
- server=self.__host,
- )
- else:
- kw = error.get('data', {})
- kw['message'] = error['message']
- > raise error_class(**kw)
- E NotFound: fw: DNS resource record not found
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:1115: NotFound
- test_forwardzone_delegation_warnings.test_command[0012: dnsrecord_add: Delegate zone u'fw.sub2.sub.dnszone.test.' from zone u'sub.dnszone.test.' using NS record]
- self = <ipatests.test_xmlrpc.test_dns_plugin.test_forwardzone_delegation_warnings object at 0x7fce013ed5d0>
- index = 12
- declarative_test_definition = {'command': ('dnsrecord_add', ['sub.dnszone.test.', 'fw.sub2'], {'nsrecord': 'vm-025.abc.idm.lab.eng.brq.redhat.com.',...ice': "0012: dnsrecord_add: Delegate zone u'fw.sub2.sub.dnszone.test.' from zone u'sub.dnszone.test.' using NS record"}
- def test_command(self, index, declarative_test_definition):
- """Run an individual test
- The arguments are provided by the pytest plugin.
- """
- if callable(declarative_test_definition):
- declarative_test_definition(self)
- else:
- > self.check(**declarative_test_definition)
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:318:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:330: in check
- self.check_output(nice, cmd, args, options, expected, extra_check)
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:378: in check_output
- got = api.Command[cmd](*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:447: in __call__
- return self.__do_call(*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:475: in __do_call
- ret = self.run(*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:799: in run
- return self.forward(*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:822: in forward
- *args, **kw)
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:990: in forward
- return self._call_command(command, params)
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:971: in _call_command
- return command(*params)
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:1121: in _call
- return self.__request(name, args)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <ipalib.rpc.JSONServerProxy object at 0x7fce013e6150>, name = 'dnsrecord_add/1'
- args = ((<DNS name sub.dnszone.test.>, <DNS name fw.sub2>), {'nsrecord': ('vm-025.abc.idm.lab.eng.brq.redhat.com.',), 'version': '2.216'})
- def __request(self, name, args):
- payload = {'method': unicode(name), 'params': args, 'id': 0}
- version = args[1].get('version', VERSION_WITHOUT_CAPABILITIES)
- payload = json_encode_binary(payload, version)
- if self.__verbose >= 2:
- root_logger.info('Request: %s',
- json.dumps(payload, sort_keys=True, indent=4))
- response = self.__transport.request(
- self.__host,
- self.__handler,
- json.dumps(payload).encode('utf-8'),
- verbose=self.__verbose >= 3,
- )
- try:
- response = json_decode_binary(json.loads(response.decode('ascii')))
- except ValueError as e:
- raise JSONError(error=str(e))
- if self.__verbose >= 2:
- root_logger.info(
- 'Response: %s',
- json.dumps(json_encode_binary(response, version),
- sort_keys=True, indent=4)
- )
- error = response.get('error')
- if error:
- try:
- error_class = errors_by_code[error['code']]
- except KeyError:
- raise UnknownError(
- code=error.get('code'),
- error=error.get('message'),
- server=self.__host,
- )
- else:
- kw = error.get('data', {})
- kw['message'] = error['message']
- > raise error_class(**kw)
- E NotFound: Nameserver 'vm-025.abc.idm.lab.eng.brq.redhat.com.' does not have a corresponding A/AAAA record
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:1115: NotFound
- test_forwardzone_delegation_warnings.test_command[0014: dnsforwardzone_enable: Enable forward zone u'fw.sub2.sub.dnszone.test.']
- self = <ipatests.test_xmlrpc.test_dns_plugin.test_forwardzone_delegation_warnings object at 0x7fce01759650>
- index = 14
- declarative_test_definition = {'command': ('dnsforwardzone_enable', ['fw.sub2.sub.dnszone.test.'], {'version': '2.216'}), 'desc': "Enable forward zo...e fw.sub2.sub.dnszone.test.>}, 'nice': "0014: dnsforwardzone_enable: Enable forward zone u'fw.sub2.sub.dnszone.test.'"}
- def test_command(self, index, declarative_test_definition):
- """Run an individual test
- The arguments are provided by the pytest plugin.
- """
- if callable(declarative_test_definition):
- declarative_test_definition(self)
- else:
- > self.check(**declarative_test_definition)
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:318:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:330: in check
- self.check_output(nice, cmd, args, options, expected, extra_check)
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:379: in check_output
- assert_deepequal(expected, got, nice)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- expected = {'result': True, 'summary': 'Enabled DNS forward zone "fw.sub2.sub.dnszone.test."', 'value': <DNS name fw.sub2.sub.dnszone.test.>}
- got = {'messages': ({'code': 13008, 'data': {'authzone': 'sub.dnszone.test.', 'fwzone': 'fw.sub2.sub.dnszone.test.', 'ns_rec...True, 'summary': 'Enabled DNS forward zone "fw.sub2.sub.dnszone.test."', 'value': <DNS name fw.sub2.sub.dnszone.test.>}
- doc = "0014: dnsforwardzone_enable: Enable forward zone u'fw.sub2.sub.dnszone.test.'"
- stack = ()
- def assert_deepequal(expected, got, doc='', stack=tuple()):
- """
- Recursively check for type and equality.
- If a value in expected is callable then it will used as a callback to
- test for equality on the got value. The callback is passed the got
- value and returns True if equal, False otherwise.
- If the tests fails, it will raise an ``AssertionError`` with detailed
- information, including the path to the offending value. For example:
- >>> expected = [u'Hello', dict(world=u'how are you?')]
- >>> got = [u'Hello', dict(world='how are you?')]
- >>> expected == got
- True
- >>> assert_deepequal(expected, got, doc='Testing my nested data')
- Traceback (most recent call last):
- ...
- AssertionError: assert_deepequal: type(expected) is not type(got).
- Testing my nested data
- type(expected) = <type 'unicode'>
- type(got) = <type 'str'>
- expected = u'how are you?'
- got = 'how are you?'
- path = (0, 'world')
- Note that lists and tuples are considered equivalent, and the order of
- their elements does not matter.
- """
- try:
- pretty_print = pytest.config.getoption("pretty_print") # pylint: disable=no-member
- except AttributeError:
- pretty_print = False
- if pretty_print:
- expected_str = struct_to_string(expected, EXPECTED_LEN)
- got_str = struct_to_string(got, GOT_LEN)
- else:
- expected_str = repr(expected)
- got_str = repr(got)
- if isinstance(expected, tuple):
- expected = list(expected)
- if isinstance(got, tuple):
- got = list(got)
- if isinstance(expected, DN):
- if isinstance(got, six.string_types):
- got = DN(got)
- if not (isinstance(expected, Fuzzy) or callable(expected) or type(expected) is type(got)):
- raise AssertionError(
- TYPE % (doc, type(expected), type(got), expected, got, stack)
- )
- if isinstance(expected, (list, tuple)):
- if len(expected) != len(got):
- raise AssertionError(
- LEN % (doc, len(expected), len(got), expected_str, got_str,
- stack)
- )
- # Sort list elements, unless they are dictionaries
- if expected and isinstance(expected[0], dict):
- s_got = got
- s_expected = expected
- else:
- try:
- s_got = sorted(got)
- except TypeError:
- s_got = got
- try:
- s_expected = sorted(expected)
- except TypeError:
- s_expected = expected
- for (i, e_sub) in enumerate(s_expected):
- g_sub = s_got[i]
- assert_deepequal(e_sub, g_sub, doc, stack + (i,))
- elif isinstance(expected, dict):
- missing = set(expected).difference(got)
- extra = set(got).difference(expected)
- if missing or extra:
- raise AssertionError(KEYS % (
- doc, sorted(missing), sorted(extra), expected_str, got_str,
- > stack)
- )
- E AssertionError: assert_deepequal: dict keys mismatch.
- E 0014: dnsforwardzone_enable: Enable forward zone u'fw.sub2.sub.dnszone.test.'
- E missing keys = []
- E extra keys = [u'messages']
- E expected = {'result': True,
- E 'summary': u'Enabled DNS forward zone "fw.sub2.sub.dnszone.test."',
- E 'value': <DNS name fw.sub2.sub.dnszone.test.>}
- E got = {u'messages': ({u'code': 13008,
- E u'data': {u'authzone': u'sub.dnszone.test.',
- E u'fwzone': u'fw.sub2.sub.dnszone.test.',
- E u'ns_rec': u'fw.sub2'},
- E u'message': u'forward zone "fw.sub2.sub.dnszone.test." is not effective because of missing proper NS delegation in authoritative zone "sub.dnszone.test.". Please add NS record "fw.sub2" to parent zone "sub.dnszone.test.".',
- E u'name': u'ForwardzoneIsNotEffectiveWarning',
- E u'type': u'warning'},),
- E u'result': True,
- E u'summary': u'Enabled DNS forward zone "fw.sub2.sub.dnszone.test."',
- E u'value': <DNS name fw.sub2.sub.dnszone.test.>}
- E path = ()
- /usr/lib/python2.7/site-packages/ipatests/util.py:384: AssertionError
- test_forwardzone_delegation_warnings.test_command[0016: dnsrecord_add: Delegate zone u'fw.sub2.sub.dnszone.test.' from zone u'dnszone.test' using NS record]
- self = <ipatests.test_xmlrpc.test_dns_plugin.test_forwardzone_delegation_warnings object at 0x7fce0167b050>
- index = 16
- declarative_test_definition = {'command': ('dnsrecord_add', ['dnszone.test', 'fw.sub2.sub'], {'nsrecord': 'vm-025.abc.idm.lab.eng.brq.redhat.com.', ...}, 'nice': "0016: dnsrecord_add: Delegate zone u'fw.sub2.sub.dnszone.test.' from zone u'dnszone.test' using NS record"}
- def test_command(self, index, declarative_test_definition):
- """Run an individual test
- The arguments are provided by the pytest plugin.
- """
- if callable(declarative_test_definition):
- declarative_test_definition(self)
- else:
- > self.check(**declarative_test_definition)
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:318:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:330: in check
- self.check_output(nice, cmd, args, options, expected, extra_check)
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:378: in check_output
- got = api.Command[cmd](*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:447: in __call__
- return self.__do_call(*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:475: in __do_call
- ret = self.run(*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:799: in run
- return self.forward(*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:822: in forward
- *args, **kw)
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:990: in forward
- return self._call_command(command, params)
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:971: in _call_command
- return command(*params)
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:1121: in _call
- return self.__request(name, args)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <ipalib.rpc.JSONServerProxy object at 0x7fce013e6150>, name = 'dnsrecord_add/1'
- args = ((<DNS name dnszone.test.>, <DNS name fw.sub2.sub>), {'nsrecord': ('vm-025.abc.idm.lab.eng.brq.redhat.com.',), 'version': '2.216'})
- def __request(self, name, args):
- payload = {'method': unicode(name), 'params': args, 'id': 0}
- version = args[1].get('version', VERSION_WITHOUT_CAPABILITIES)
- payload = json_encode_binary(payload, version)
- if self.__verbose >= 2:
- root_logger.info('Request: %s',
- json.dumps(payload, sort_keys=True, indent=4))
- response = self.__transport.request(
- self.__host,
- self.__handler,
- json.dumps(payload).encode('utf-8'),
- verbose=self.__verbose >= 3,
- )
- try:
- response = json_decode_binary(json.loads(response.decode('ascii')))
- except ValueError as e:
- raise JSONError(error=str(e))
- if self.__verbose >= 2:
- root_logger.info(
- 'Response: %s',
- json.dumps(json_encode_binary(response, version),
- sort_keys=True, indent=4)
- )
- error = response.get('error')
- if error:
- try:
- error_class = errors_by_code[error['code']]
- except KeyError:
- raise UnknownError(
- code=error.get('code'),
- error=error.get('message'),
- server=self.__host,
- )
- else:
- kw = error.get('data', {})
- kw['message'] = error['message']
- > raise error_class(**kw)
- E NotFound: Nameserver 'vm-025.abc.idm.lab.eng.brq.redhat.com.' does not have a corresponding A/AAAA record
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:1115: NotFound
- test_forwardzone_delegation_warnings.test_command[0017: dnsrecord_mod: Delete (using dnsrecord-mod) NS record which delegates zone u'fw.sub2.sub.dnszone.test.' from zone u'dnszone.test' (expected warning for u'fw.sub2.sub.dnszone.test.')]
- self = <ipatests.test_xmlrpc.test_dns_plugin.test_forwardzone_delegation_warnings object at 0x7fce016e4410>
- index = 17
- declarative_test_definition = {'command': ('dnsrecord_mod', ['dnszone.test', 'fw.sub2.sub'], {'nsrecord': None, 'version': '2.216'}), 'desc': "Delet...gates zone u'fw.sub2.sub.dnszone.test.' from zone u'dnszone.test' (expected warning for u'fw.sub2.sub.dnszone.test.')"}
- def test_command(self, index, declarative_test_definition):
- """Run an individual test
- The arguments are provided by the pytest plugin.
- """
- if callable(declarative_test_definition):
- declarative_test_definition(self)
- else:
- > self.check(**declarative_test_definition)
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:318:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:330: in check
- self.check_output(nice, cmd, args, options, expected, extra_check)
- /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:378: in check_output
- got = api.Command[cmd](*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:447: in __call__
- return self.__do_call(*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:475: in __do_call
- ret = self.run(*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:799: in run
- return self.forward(*args, **options)
- /usr/lib/python2.7/site-packages/ipalib/frontend.py:822: in forward
- *args, **kw)
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:990: in forward
- return self._call_command(command, params)
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:971: in _call_command
- return command(*params)
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:1121: in _call
- return self.__request(name, args)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <ipalib.rpc.JSONServerProxy object at 0x7fce013e6150>, name = 'dnsrecord_mod/1'
- args = ((<DNS name dnszone.test.>, <DNS name fw.sub2.sub>), {'nsrecord': None, 'version': '2.216'})
- def __request(self, name, args):
- payload = {'method': unicode(name), 'params': args, 'id': 0}
- version = args[1].get('version', VERSION_WITHOUT_CAPABILITIES)
- payload = json_encode_binary(payload, version)
- if self.__verbose >= 2:
- root_logger.info('Request: %s',
- json.dumps(payload, sort_keys=True, indent=4))
- response = self.__transport.request(
- self.__host,
- self.__handler,
- json.dumps(payload).encode('utf-8'),
- verbose=self.__verbose >= 3,
- )
- try:
- response = json_decode_binary(json.loads(response.decode('ascii')))
- except ValueError as e:
- raise JSONError(error=str(e))
- if self.__verbose >= 2:
- root_logger.info(
- 'Response: %s',
- json.dumps(json_encode_binary(response, version),
- sort_keys=True, indent=4)
- )
- error = response.get('error')
- if error:
- try:
- error_class = errors_by_code[error['code']]
- except KeyError:
- raise UnknownError(
- code=error.get('code'),
- error=error.get('message'),
- server=self.__host,
- )
- else:
- kw = error.get('data', {})
- kw['message'] = error['message']
- > raise error_class(**kw)
- E NotFound: fw.sub2.sub: DNS resource record not found
- /usr/lib/python2.7/site-packages/ipalib/rpc.py:1115: NotFound
- ========== 33 failed, 2460 passed, 82 skipped, 1 pytest-warnings in 2367.26 seconds ==========
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement