Advertisement
Guest User

Untitled

a guest
Nov 29th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 75.56 KB | None | 0 0
  1. ==================================== test session starts =====================================
  2. platform linux2 -- Python 2.7.12, pytest-2.9.2, py-1.4.31, pluggy-0.3.1
  3. rootdir: /usr/lib/python2.7/site-packages/ipatests, inifile: pytest.ini
  4. plugins: sourceorder-0.5, multihost-1.0
  5. collected 2575 items
  6.  
  7. test_cmdline/test_cli.py ..............
  8. test_cmdline/test_help.py ......
  9. test_cmdline/test_ipagetkeytab.py .....ssssssss
  10. test_install/test_updates.py sssssssssss
  11. test_ipalib/test_aci.py ...................
  12. test_ipalib/test_backend.py .......F
  13. test_ipalib/test_base.py ...............
  14. test_ipalib/test_capabilities.py .
  15. test_ipalib/test_cli.py ...
  16. test_ipalib/test_config.py ............
  17. test_ipalib/test_crud.py FFFFFFFFFF.....
  18. test_ipalib/test_errors.py .......
  19. test_ipalib/test_frontend.py ................F...F.FF.....F..FF.F....
  20. test_ipalib/test_messages.py ....
  21. test_ipalib/test_output.py ...
  22. test_ipalib/test_parameters.py ......F......................................................
  23. test_ipalib/test_plugable.py ....FFF
  24. test_ipalib/test_rpc.py .....F........
  25. test_ipalib/test_text.py .............................
  26. test_ipalib/test_x509.py ...
  27. test_ipapython/test_cookie.py ............
  28. test_ipapython/test_dn.py ...........................
  29. test_ipapython/test_dnssec.py .
  30. test_ipapython/test_ipap11helper.py ...............
  31. test_ipapython/test_ipautil.py ..................................................................
  32. test_ipapython/test_ipavalidate.py ..........
  33. test_ipapython/test_kerberos.py ..............
  34. test_ipapython/test_keyring.py ..........
  35. test_ipapython/test_secrets.py .
  36. test_ipapython/test_ssh.py ...............................
  37. test_ipaserver/test_changepw.py ....
  38. test_ipaserver/test_ldap.py ..ss..............
  39. test_ipaserver/test_otptoken_import.py sssssssss
  40. test_ipaserver/test_rpcserver.py .......FF
  41. test_ipaserver/test_serverroles.py .................................................
  42. test_ipaserver/test_topology_plugin.py s
  43. test_ipaserver/test_version_comparison.py ............
  44. test_ipaserver/test_install/test_adtrustinstance.py ..
  45. test_ipaserver/test_install/test_service.py .
  46. test_xmlrpc/test_add_remove_cert_cmd.py .......................................
  47. test_xmlrpc/test_attr.py ...............................
  48. test_xmlrpc/test_automember_plugin.py ..............................
  49. test_xmlrpc/test_automount_plugin.py ......................................
  50. test_xmlrpc/test_baseldap_plugin.py ....
  51. test_xmlrpc/test_batch_plugin.py ......
  52. test_xmlrpc/test_ca_plugin.py ...............
  53. test_xmlrpc/test_caacl_plugin.py ....................
  54. test_xmlrpc/test_caacl_profile_enforcement.py .............................................................
  55. test_xmlrpc/test_cert_plugin.py .........................................
  56. test_xmlrpc/test_certprofile_plugin.py ..................
  57. test_xmlrpc/test_config_plugin.py ..................
  58. test_xmlrpc/test_delegation_plugin.py .................
  59. test_xmlrpc/test_dns_plugin.py .......................................................................................................................................................................................................................................................................................F.FF.F.F.FF....................................
  60. test_xmlrpc/test_dns_realmdomains_integration.py ...
  61. test_xmlrpc/test_external_members.py sssss
  62. test_xmlrpc/test_group_plugin.py .....................................................
  63. test_xmlrpc/test_hbac_plugin.py ....................................
  64. test_xmlrpc/test_hbacsvcgroup_plugin.py ...............
  65. test_xmlrpc/test_hbactest_plugin.py ........
  66. test_xmlrpc/test_host_plugin.py .........................................
  67. test_xmlrpc/test_hostgroup_plugin.py .............
  68. test_xmlrpc/test_idviews_plugin.py ...................................................................................
  69. test_xmlrpc/test_kerberos_principal_aliases.py ...............
  70. test_xmlrpc/test_krbtpolicy.py ......
  71. test_xmlrpc/test_location_plugin.py .........................................
  72. test_xmlrpc/test_nesting.py .......
  73. test_xmlrpc/test_netgroup_plugin.py .......................................................
  74. test_xmlrpc/test_old_permission_plugin.py .............................................................
  75. test_xmlrpc/test_passwd_plugin.py ...
  76. test_xmlrpc/test_permission_plugin.py ...............................................................................................................................................................................................................................................................................
  77. test_xmlrpc/test_ping_plugin.py ...
  78. test_xmlrpc/test_privilege_plugin.py .......................
  79. test_xmlrpc/test_pwpolicy_plugin.py ..................
  80. test_xmlrpc/test_radiusproxy_plugin.py ...................................
  81. test_xmlrpc/test_range_plugin.py ................................
  82. test_xmlrpc/test_realmdomains_plugin.py .............
  83. test_xmlrpc/test_replace.py .......
  84. test_xmlrpc/test_role_plugin.py ........................................
  85. test_xmlrpc/test_selfservice_plugin.py ..................
  86. test_xmlrpc/test_selinuxusermap_plugin.py ............................................................
  87. test_xmlrpc/test_service_plugin.py .................................................................
  88. test_xmlrpc/test_servicedelegation_plugin.py ...........................
  89. test_xmlrpc/test_stageuser_plugin.py .............................................................................
  90. test_xmlrpc/test_sudocmd_plugin.py ..............
  91. test_xmlrpc/test_sudocmdgroup_plugin.py ...................
  92. test_xmlrpc/test_sudorule_plugin.py ..................................................
  93. test_xmlrpc/test_trust_plugin.py sssssss
  94. test_xmlrpc/test_user_plugin.py ......................................................................
  95. test_xmlrpc/test_vault_plugin.py sssssssssssssssssssssssssssssssssssssss
  96. test_xmlrpc/xmlrpc_test.py .
  97.  
  98. ========================================== FAILURES ==========================================
  99. _______________________________ test_Executioner.test_execute ________________________________
  100.  
  101. self = <ipatests.test_ipalib.test_backend.test_Executioner object at 0x7fce038f8ed0>
  102.  
  103. def test_execute(self):
  104. """
  105. Test the `ipalib.backend.Executioner.execute` method.
  106. """
  107. > api, _home = create_test_api(in_server=True)
  108.  
  109. test_ipalib/test_backend.py:192:
  110. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  111. util.py:523: in create_test_api
  112. api = ipalib.create_api(mode='unit_test')
  113. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  114.  
  115. mode = 'unit_test'
  116.  
  117. def create_api(mode='dummy'):
  118. """
  119. Return standard `plugable.API` instance.
  120.  
  121. This standard instance allows plugins that subclass from the following
  122. base classes:
  123.  
  124. - `frontend.Command`
  125.  
  126. - `frontend.Object`
  127.  
  128. - `frontend.Method`
  129.  
  130. - `backend.Backend`
  131. """
  132. api = API()
  133. if mode is not None:
  134. > api.env.mode = mode
  135. E AttributeError: 'API' object has no attribute 'env'
  136.  
  137. ../ipalib/__init__.py:947: AttributeError
  138. _________________________________ test_Create.test_get_args __________________________________
  139.  
  140. self = <ipatests.test_ipalib.test_crud.test_Create object at 0x7fce038c2f10>
  141.  
  142. def test_get_args(self):
  143. """
  144. Test the `ipalib.crud.Create.get_args` method.
  145. """
  146. > api = self.get_api()
  147.  
  148. test_ipalib/test_crud.py:70:
  149. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  150. test_ipalib/test_crud.py:41: in get_api
  151. api, _home = get_api()
  152. util.py:508: in get_api
  153. api = ipalib.create_api(mode='unit_test')
  154. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  155.  
  156. mode = 'unit_test'
  157.  
  158. def create_api(mode='dummy'):
  159. """
  160. Return standard `plugable.API` instance.
  161.  
  162. This standard instance allows plugins that subclass from the following
  163. base classes:
  164.  
  165. - `frontend.Command`
  166.  
  167. - `frontend.Object`
  168.  
  169. - `frontend.Method`
  170.  
  171. - `backend.Backend`
  172. """
  173. api = API()
  174. if mode is not None:
  175. > api.env.mode = mode
  176. E AttributeError: 'API' object has no attribute 'env'
  177.  
  178. ../ipalib/__init__.py:947: AttributeError
  179. ________________________________ test_Create.test_get_options ________________________________
  180.  
  181. self = <ipatests.test_ipalib.test_crud.test_Create object at 0x7fce02035a50>
  182.  
  183. def test_get_options(self):
  184. """
  185. Test the `ipalib.crud.Create.get_options` method.
  186. """
  187. > api = self.get_api()
  188.  
  189. test_ipalib/test_crud.py:78:
  190. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  191. test_ipalib/test_crud.py:41: in get_api
  192. api, _home = get_api()
  193. util.py:508: in get_api
  194. api = ipalib.create_api(mode='unit_test')
  195. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  196.  
  197. mode = 'unit_test'
  198.  
  199. def create_api(mode='dummy'):
  200. """
  201. Return standard `plugable.API` instance.
  202.  
  203. This standard instance allows plugins that subclass from the following
  204. base classes:
  205.  
  206. - `frontend.Command`
  207.  
  208. - `frontend.Object`
  209.  
  210. - `frontend.Method`
  211.  
  212. - `backend.Backend`
  213. """
  214. api = API()
  215. if mode is not None:
  216. > api.env.mode = mode
  217. E AttributeError: 'API' object has no attribute 'env'
  218.  
  219. ../ipalib/__init__.py:947: AttributeError
  220. _________________________________ test_Update.test_get_args __________________________________
  221.  
  222. self = <ipatests.test_ipalib.test_crud.test_Update object at 0x7fce02175e50>
  223.  
  224. def test_get_args(self):
  225. """
  226. Test the `ipalib.crud.Update.get_args` method.
  227. """
  228. > api = self.get_api()
  229.  
  230. test_ipalib/test_crud.py:101:
  231. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  232. test_ipalib/test_crud.py:41: in get_api
  233. api, _home = get_api()
  234. util.py:508: in get_api
  235. api = ipalib.create_api(mode='unit_test')
  236. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  237.  
  238. mode = 'unit_test'
  239.  
  240. def create_api(mode='dummy'):
  241. """
  242. Return standard `plugable.API` instance.
  243.  
  244. This standard instance allows plugins that subclass from the following
  245. base classes:
  246.  
  247. - `frontend.Command`
  248.  
  249. - `frontend.Object`
  250.  
  251. - `frontend.Method`
  252.  
  253. - `backend.Backend`
  254. """
  255. api = API()
  256. if mode is not None:
  257. > api.env.mode = mode
  258. E AttributeError: 'API' object has no attribute 'env'
  259.  
  260. ../ipalib/__init__.py:947: AttributeError
  261. ________________________________ test_Update.test_get_options ________________________________
  262.  
  263. self = <ipatests.test_ipalib.test_crud.test_Update object at 0x7fce038c22d0>
  264.  
  265. def test_get_options(self):
  266. """
  267. Test the `ipalib.crud.Update.get_options` method.
  268. """
  269. > api = self.get_api()
  270.  
  271. test_ipalib/test_crud.py:109:
  272. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  273. test_ipalib/test_crud.py:41: in get_api
  274. api, _home = get_api()
  275. util.py:508: in get_api
  276. api = ipalib.create_api(mode='unit_test')
  277. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  278.  
  279. mode = 'unit_test'
  280.  
  281. def create_api(mode='dummy'):
  282. """
  283. Return standard `plugable.API` instance.
  284.  
  285. This standard instance allows plugins that subclass from the following
  286. base classes:
  287.  
  288. - `frontend.Command`
  289.  
  290. - `frontend.Object`
  291.  
  292. - `frontend.Method`
  293.  
  294. - `backend.Backend`
  295. """
  296. api = API()
  297. if mode is not None:
  298. > api.env.mode = mode
  299. E AttributeError: 'API' object has no attribute 'env'
  300.  
  301. ../ipalib/__init__.py:947: AttributeError
  302. ________________________________ test_Retrieve.test_get_args _________________________________
  303.  
  304. self = <ipatests.test_ipalib.test_crud.test_Retrieve object at 0x7fce03b55410>
  305.  
  306. def test_get_args(self):
  307. """
  308. Test the `ipalib.crud.Retrieve.get_args` method.
  309. """
  310. > api = self.get_api()
  311.  
  312. test_ipalib/test_crud.py:130:
  313. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  314. test_ipalib/test_crud.py:41: in get_api
  315. api, _home = get_api()
  316. util.py:508: in get_api
  317. api = ipalib.create_api(mode='unit_test')
  318. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  319.  
  320. mode = 'unit_test'
  321.  
  322. def create_api(mode='dummy'):
  323. """
  324. Return standard `plugable.API` instance.
  325.  
  326. This standard instance allows plugins that subclass from the following
  327. base classes:
  328.  
  329. - `frontend.Command`
  330.  
  331. - `frontend.Object`
  332.  
  333. - `frontend.Method`
  334.  
  335. - `backend.Backend`
  336. """
  337. api = API()
  338. if mode is not None:
  339. > api.env.mode = mode
  340. E AttributeError: 'API' object has no attribute 'env'
  341.  
  342. ../ipalib/__init__.py:947: AttributeError
  343. _______________________________ test_Retrieve.test_get_options _______________________________
  344.  
  345. self = <ipatests.test_ipalib.test_crud.test_Retrieve object at 0x7fce02043fd0>
  346.  
  347. def test_get_options(self):
  348. """
  349. Test the `ipalib.crud.Retrieve.get_options` method.
  350. """
  351. > api = self.get_api()
  352.  
  353. test_ipalib/test_crud.py:138:
  354. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  355. test_ipalib/test_crud.py:41: in get_api
  356. api, _home = get_api()
  357. util.py:508: in get_api
  358. api = ipalib.create_api(mode='unit_test')
  359. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  360.  
  361. mode = 'unit_test'
  362.  
  363. def create_api(mode='dummy'):
  364. """
  365. Return standard `plugable.API` instance.
  366.  
  367. This standard instance allows plugins that subclass from the following
  368. base classes:
  369.  
  370. - `frontend.Command`
  371.  
  372. - `frontend.Object`
  373.  
  374. - `frontend.Method`
  375.  
  376. - `backend.Backend`
  377. """
  378. api = API()
  379. if mode is not None:
  380. > api.env.mode = mode
  381. E AttributeError: 'API' object has no attribute 'env'
  382.  
  383. ../ipalib/__init__.py:947: AttributeError
  384. _________________________________ test_Delete.test_get_args __________________________________
  385.  
  386. self = <ipatests.test_ipalib.test_crud.test_Delete object at 0x7fce020ce810>
  387.  
  388. def test_get_args(self):
  389. """
  390. Test the `ipalib.crud.Delete.get_args` method.
  391. """
  392. > api = self.get_api()
  393.  
  394. test_ipalib/test_crud.py:153:
  395. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  396. test_ipalib/test_crud.py:41: in get_api
  397. api, _home = get_api()
  398. util.py:508: in get_api
  399. api = ipalib.create_api(mode='unit_test')
  400. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  401.  
  402. mode = 'unit_test'
  403.  
  404. def create_api(mode='dummy'):
  405. """
  406. Return standard `plugable.API` instance.
  407.  
  408. This standard instance allows plugins that subclass from the following
  409. base classes:
  410.  
  411. - `frontend.Command`
  412.  
  413. - `frontend.Object`
  414.  
  415. - `frontend.Method`
  416.  
  417. - `backend.Backend`
  418. """
  419. api = API()
  420. if mode is not None:
  421. > api.env.mode = mode
  422. E AttributeError: 'API' object has no attribute 'env'
  423.  
  424. ../ipalib/__init__.py:947: AttributeError
  425. ________________________________ test_Delete.test_get_options ________________________________
  426.  
  427. self = <ipatests.test_ipalib.test_crud.test_Delete object at 0x7fce0389c0d0>
  428.  
  429. def test_get_options(self):
  430. """
  431. Test the `ipalib.crud.Delete.get_options` method.
  432. """
  433. > api = self.get_api()
  434.  
  435. test_ipalib/test_crud.py:161:
  436. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  437. test_ipalib/test_crud.py:41: in get_api
  438. api, _home = get_api()
  439. util.py:508: in get_api
  440. api = ipalib.create_api(mode='unit_test')
  441. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  442.  
  443. mode = 'unit_test'
  444.  
  445. def create_api(mode='dummy'):
  446. """
  447. Return standard `plugable.API` instance.
  448.  
  449. This standard instance allows plugins that subclass from the following
  450. base classes:
  451.  
  452. - `frontend.Command`
  453.  
  454. - `frontend.Object`
  455.  
  456. - `frontend.Method`
  457.  
  458. - `backend.Backend`
  459. """
  460. api = API()
  461. if mode is not None:
  462. > api.env.mode = mode
  463. E AttributeError: 'API' object has no attribute 'env'
  464.  
  465. ../ipalib/__init__.py:947: AttributeError
  466. _________________________________ test_Search.test_get_args __________________________________
  467.  
  468. self = <ipatests.test_ipalib.test_crud.test_Search object at 0x7fce02035e10>
  469.  
  470. def test_get_args(self):
  471. """
  472. Test the `ipalib.crud.Search.get_args` method.
  473. """
  474. > api = self.get_api()
  475.  
  476. test_ipalib/test_crud.py:177:
  477. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  478. test_ipalib/test_crud.py:41: in get_api
  479. api, _home = get_api()
  480. util.py:508: in get_api
  481. api = ipalib.create_api(mode='unit_test')
  482. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  483.  
  484. mode = 'unit_test'
  485.  
  486. def create_api(mode='dummy'):
  487. """
  488. Return standard `plugable.API` instance.
  489.  
  490. This standard instance allows plugins that subclass from the following
  491. base classes:
  492.  
  493. - `frontend.Command`
  494.  
  495. - `frontend.Object`
  496.  
  497. - `frontend.Method`
  498.  
  499. - `backend.Backend`
  500. """
  501. api = API()
  502. if mode is not None:
  503. > api.env.mode = mode
  504. E AttributeError: 'API' object has no attribute 'env'
  505.  
  506. ../ipalib/__init__.py:947: AttributeError
  507. ________________________________ test_Search.test_get_options ________________________________
  508.  
  509. self = <ipatests.test_ipalib.test_crud.test_Search object at 0x7fce038c2b50>
  510.  
  511. def test_get_options(self):
  512. """
  513. Test the `ipalib.crud.Search.get_options` method.
  514. """
  515. > api = self.get_api()
  516.  
  517. test_ipalib/test_crud.py:185:
  518. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  519. test_ipalib/test_crud.py:41: in get_api
  520. api, _home = get_api()
  521. util.py:508: in get_api
  522. api = ipalib.create_api(mode='unit_test')
  523. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  524.  
  525. mode = 'unit_test'
  526.  
  527. def create_api(mode='dummy'):
  528. """
  529. Return standard `plugable.API` instance.
  530.  
  531. This standard instance allows plugins that subclass from the following
  532. base classes:
  533.  
  534. - `frontend.Command`
  535.  
  536. - `frontend.Object`
  537.  
  538. - `frontend.Method`
  539.  
  540. - `backend.Backend`
  541. """
  542. api = API()
  543. if mode is not None:
  544. > api.env.mode = mode
  545. E AttributeError: 'API' object has no attribute 'env'
  546.  
  547. ../ipalib/__init__.py:947: AttributeError
  548. __________________________ test_Command.test_default_from_chaining ___________________________
  549.  
  550. self = <ipatests.test_ipalib.test_frontend.test_Command object at 0x7fce03885490>
  551.  
  552. def test_default_from_chaining(self):
  553. """
  554. Test chaining of parameters through default_from.
  555. """
  556. class my_cmd(self.cls):
  557. takes_options = (
  558. Str('option0'),
  559. Str('option1', default_from=lambda option0: option0),
  560. Str('option2', default_from=lambda option1: option1),
  561. )
  562.  
  563. def run(self, *args, **options):
  564. return dict(result=options)
  565.  
  566. kw = dict(option0=u'some value')
  567.  
  568. > api, _home = create_test_api()
  569.  
  570. test_ipalib/test_frontend.py:460:
  571. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  572. util.py:523: in create_test_api
  573. api = ipalib.create_api(mode='unit_test')
  574. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  575.  
  576. mode = 'unit_test'
  577.  
  578. def create_api(mode='dummy'):
  579. """
  580. Return standard `plugable.API` instance.
  581.  
  582. This standard instance allows plugins that subclass from the following
  583. base classes:
  584.  
  585. - `frontend.Command`
  586.  
  587. - `frontend.Object`
  588.  
  589. - `frontend.Method`
  590.  
  591. - `backend.Backend`
  592. """
  593. api = API()
  594. if mode is not None:
  595. > api.env.mode = mode
  596. E AttributeError: 'API' object has no attribute 'env'
  597.  
  598. ../ipalib/__init__.py:947: AttributeError
  599. ___________________________ test_Command.test_args_options_2_entry ___________________________
  600.  
  601. self = <ipatests.test_ipalib.test_frontend.test_Command object at 0x7fce038a21d0>
  602.  
  603. def test_args_options_2_entry(self):
  604. """
  605. Test `ipalib.frontend.Command.args_options_2_entry` method.
  606. """
  607. class my_cmd(self.cls):
  608. takes_args = (
  609. parameters.Str('one', attribute=True),
  610. parameters.Str('two', attribute=False),
  611. )
  612. takes_options = (
  613. parameters.Str('three', attribute=True, multivalue=True),
  614. parameters.Str('four', attribute=True, multivalue=False),
  615. )
  616.  
  617. def run(self, *args, **kw):
  618. return self.args_options_2_entry(*args, **kw)
  619.  
  620. args = ('one', 'two')
  621. kw = dict(three=('three1', 'three2'), four='four')
  622.  
  623. > api, _home = create_test_api()
  624.  
  625. test_ipalib/test_frontend.py:584:
  626. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  627. util.py:523: in create_test_api
  628. api = ipalib.create_api(mode='unit_test')
  629. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  630.  
  631. mode = 'unit_test'
  632.  
  633. def create_api(mode='dummy'):
  634. """
  635. Return standard `plugable.API` instance.
  636.  
  637. This standard instance allows plugins that subclass from the following
  638. base classes:
  639.  
  640. - `frontend.Command`
  641.  
  642. - `frontend.Object`
  643.  
  644. - `frontend.Method`
  645.  
  646. - `backend.Backend`
  647. """
  648. api = API()
  649. if mode is not None:
  650. > api.env.mode = mode
  651. E AttributeError: 'API' object has no attribute 'env'
  652.  
  653. ../ipalib/__init__.py:947: AttributeError
  654. ___________________________________ test_Command.test_run ____________________________________
  655.  
  656. self = <ipatests.test_ipalib.test_frontend.test_Command object at 0x7fce0207e290>
  657.  
  658. def test_run(self):
  659. """
  660. Test the `ipalib.frontend.Command.run` method.
  661. """
  662. class my_cmd(self.cls):
  663. def execute(self, *args, **kw):
  664. return ('execute', args, kw)
  665.  
  666. def forward(self, *args, **kw):
  667. return ('forward', args, kw)
  668.  
  669. args = ('Hello,', 'world,')
  670. kw = dict(how_are='you', on_this='fine day?', version=API_VERSION)
  671.  
  672. # Test in server context:
  673. > api, _home = create_test_api(in_server=True)
  674.  
  675. test_ipalib/test_frontend.py:623:
  676. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  677. util.py:523: in create_test_api
  678. api = ipalib.create_api(mode='unit_test')
  679. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  680.  
  681. mode = 'unit_test'
  682.  
  683. def create_api(mode='dummy'):
  684. """
  685. Return standard `plugable.API` instance.
  686.  
  687. This standard instance allows plugins that subclass from the following
  688. base classes:
  689.  
  690. - `frontend.Command`
  691.  
  692. - `frontend.Object`
  693.  
  694. - `frontend.Method`
  695.  
  696. - `backend.Backend`
  697. """
  698. api = API()
  699. if mode is not None:
  700. > api.env.mode = mode
  701. E AttributeError: 'API' object has no attribute 'env'
  702.  
  703. ../ipalib/__init__.py:947: AttributeError
  704. _________________________________ test_Command.test_messages _________________________________
  705.  
  706. self = <ipatests.test_ipalib.test_frontend.test_Command object at 0x7fce03882cd0>
  707.  
  708. def test_messages(self):
  709. """
  710. Test correct handling of messages
  711. """
  712. class TestMessage(messages.PublicMessage):
  713. type = 'info'
  714. format = 'This is a message.'
  715. errno = 1234
  716.  
  717. class my_cmd(self.cls):
  718. def execute(self, *args, **kw):
  719. result = {'name': 'execute'}
  720. messages.add_message(kw['version'], result, TestMessage())
  721. return result
  722.  
  723. def forward(self, *args, **kw):
  724. result = {'name': 'forward'}
  725. messages.add_message(kw['version'], result, TestMessage())
  726. return result
  727.  
  728. args = ('Hello,', 'world,')
  729. kw = dict(how_are='you', on_this='fine day?', version=API_VERSION)
  730.  
  731. expected = [TestMessage().to_dict()]
  732.  
  733. # Test in server context:
  734. > api, _home = create_test_api(in_server=True)
  735.  
  736. test_ipalib/test_frontend.py:669:
  737. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  738. util.py:523: in create_test_api
  739. api = ipalib.create_api(mode='unit_test')
  740. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  741.  
  742. mode = 'unit_test'
  743.  
  744. def create_api(mode='dummy'):
  745. """
  746. Return standard `plugable.API` instance.
  747.  
  748. This standard instance allows plugins that subclass from the following
  749. base classes:
  750.  
  751. - `frontend.Command`
  752.  
  753. - `frontend.Object`
  754.  
  755. - `frontend.Method`
  756.  
  757. - `backend.Backend`
  758. """
  759. api = API()
  760. if mode is not None:
  761. > api.env.mode = mode
  762. E AttributeError: 'API' object has no attribute 'env'
  763.  
  764. ../ipalib/__init__.py:947: AttributeError
  765. ________________________________ test_LocalOrRemote.test_run _________________________________
  766.  
  767. self = <ipatests.test_ipalib.test_frontend.test_LocalOrRemote object at 0x7fce020436d0>
  768.  
  769. def test_run(self):
  770. """
  771. Test the `ipalib.frontend.LocalOrRemote.run` method.
  772. """
  773. class example(self.cls):
  774. takes_args = 'key?'
  775.  
  776. def forward(self, *args, **options):
  777. return dict(result=('forward', args, options))
  778.  
  779. def execute(self, *args, **options):
  780. return dict(result=('execute', args, options))
  781.  
  782. # Test when in_server=False:
  783. > api, _home = create_test_api(in_server=False)
  784.  
  785. test_ipalib/test_frontend.py:860:
  786. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  787. util.py:523: in create_test_api
  788. api = ipalib.create_api(mode='unit_test')
  789. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  790.  
  791. mode = 'unit_test'
  792.  
  793. def create_api(mode='dummy'):
  794. """
  795. Return standard `plugable.API` instance.
  796.  
  797. This standard instance allows plugins that subclass from the following
  798. base classes:
  799.  
  800. - `frontend.Command`
  801.  
  802. - `frontend.Object`
  803.  
  804. - `frontend.Method`
  805.  
  806. - `backend.Backend`
  807. """
  808. api = API()
  809. if mode is not None:
  810. > api.env.mode = mode
  811. E AttributeError: 'API' object has no attribute 'env'
  812.  
  813. ../ipalib/__init__.py:947: AttributeError
  814. ________________________________ test_Object.test_primary_key ________________________________
  815.  
  816. self = <ipatests.test_ipalib.test_frontend.test_Object object at 0x7fce0207e350>
  817.  
  818. def test_primary_key(self):
  819. """
  820. Test the `ipalib.frontend.Object.primary_key` attribute.
  821. """
  822. > api, _home = create_test_api()
  823.  
  824. test_ipalib/test_frontend.py:1002:
  825. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  826. util.py:523: in create_test_api
  827. api = ipalib.create_api(mode='unit_test')
  828. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  829.  
  830. mode = 'unit_test'
  831.  
  832. def create_api(mode='dummy'):
  833. """
  834. Return standard `plugable.API` instance.
  835.  
  836. This standard instance allows plugins that subclass from the following
  837. base classes:
  838.  
  839. - `frontend.Command`
  840.  
  841. - `frontend.Object`
  842.  
  843. - `frontend.Method`
  844.  
  845. - `backend.Backend`
  846. """
  847. api = API()
  848. if mode is not None:
  849. > api.env.mode = mode
  850. E AttributeError: 'API' object has no attribute 'env'
  851.  
  852. ../ipalib/__init__.py:947: AttributeError
  853. __________________________________ test_Object.test_backend __________________________________
  854.  
  855. self = <ipatests.test_ipalib.test_frontend.test_Object object at 0x7fce038c2bd0>
  856.  
  857. def test_backend(self):
  858. """
  859. Test the `ipalib.frontend.Object.backend` attribute.
  860. """
  861. > api, _home = create_test_api()
  862.  
  863. test_ipalib/test_frontend.py:1048:
  864. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  865. util.py:523: in create_test_api
  866. api = ipalib.create_api(mode='unit_test')
  867. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  868.  
  869. mode = 'unit_test'
  870.  
  871. def create_api(mode='dummy'):
  872. """
  873. Return standard `plugable.API` instance.
  874.  
  875. This standard instance allows plugins that subclass from the following
  876. base classes:
  877.  
  878. - `frontend.Command`
  879.  
  880. - `frontend.Object`
  881.  
  882. - `frontend.Method`
  883.  
  884. - `backend.Backend`
  885. """
  886. api = API()
  887. if mode is not None:
  888. > api.env.mode = mode
  889. E AttributeError: 'API' object has no attribute 'env'
  890.  
  891. ../ipalib/__init__.py:947: AttributeError
  892. _______________________________ test_Object.test_params_minus ________________________________
  893.  
  894. self = <ipatests.test_ipalib.test_frontend.test_Object object at 0x7fce02035ad0>
  895.  
  896. def test_params_minus(self):
  897. """
  898. Test the `ipalib.frontend.Object.params_minus` method.
  899. """
  900. class example(self.cls):
  901. takes_params = ('one', 'two', 'three', 'four')
  902. > api, _home = create_test_api()
  903.  
  904. test_ipalib/test_frontend.py:1080:
  905. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  906. util.py:523: in create_test_api
  907. api = ipalib.create_api(mode='unit_test')
  908. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  909.  
  910. mode = 'unit_test'
  911.  
  912. def create_api(mode='dummy'):
  913. """
  914. Return standard `plugable.API` instance.
  915.  
  916. This standard instance allows plugins that subclass from the following
  917. base classes:
  918.  
  919. - `frontend.Command`
  920.  
  921. - `frontend.Object`
  922.  
  923. - `frontend.Method`
  924.  
  925. - `backend.Backend`
  926. """
  927. api = API()
  928. if mode is not None:
  929. > api.env.mode = mode
  930. E AttributeError: 'API' object has no attribute 'env'
  931.  
  932. ../ipalib/__init__.py:947: AttributeError
  933. _______________________________ test_Param.test_use_in_context _______________________________
  934.  
  935. self = <ipatests.test_ipalib.test_parameters.test_Param object at 0x7fce0389cc90>
  936.  
  937. def test_use_in_context(self):
  938. """
  939. Test the `ipalib.parameters.Param.use_in_context` method.
  940. """
  941. set1 = ('one', 'two', 'three')
  942. set2 = ('four', 'five', 'six')
  943. param1 = self.cls('param1')
  944. param2 = self.cls('param2', include=set1)
  945. param3 = self.cls('param3', exclude=set2)
  946. for context in set1:
  947. env = config.Env()
  948. > env.context = context
  949.  
  950. test_ipalib/test_parameters.py:321:
  951. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  952. ../ipalib/config.py:191: in __setattr__
  953. self[name] = value
  954. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  955.  
  956. self = <ipalib.config.Env object at 0x7fce0389c7d0>, key = 'context', value = 'one'
  957.  
  958. def __setitem__(self, key, value):
  959. """
  960. Set ``key`` to ``value``.
  961. """
  962. check_name(key)
  963. if key in self.__d:
  964. raise AttributeError(OVERRIDE_ERROR %
  965. > (self.__class__.__name__, key, self.__d[key], value)
  966. )
  967. E AttributeError: cannot override Env.context value u'default' with 'one'
  968.  
  969. ../ipalib/config.py:200: AttributeError
  970. _____________________________________ test_API.test_API ______________________________________
  971.  
  972. self = <ipatests.test_ipalib.test_plugable.test_API object at 0x7fce03883c50>
  973.  
  974. def test_API(self):
  975. """
  976. Test the `ipalib.plugable.API` class.
  977. """
  978. assert issubclass(plugable.API, plugable.ReadOnly)
  979.  
  980. # Setup the test bases, create the API:
  981. class base0(plugable.Plugin):
  982. def method(self, n):
  983. return n
  984.  
  985. class base1(plugable.Plugin):
  986. def method(self, n):
  987. return n + 1
  988.  
  989. class API(plugable.API):
  990. bases = (base0, base1)
  991. modules = ()
  992.  
  993. api = API()
  994. > api.env.mode = 'unit_test'
  995. E AttributeError: 'API' object has no attribute 'env'
  996.  
  997. test_ipalib/test_plugable.py:185: AttributeError
  998. __________________________________ test_API.test_bootstrap ___________________________________
  999.  
  1000. self = <ipatests.test_ipalib.test_plugable.test_API object at 0x7fce03883f10>
  1001.  
  1002. def test_bootstrap(self):
  1003. """
  1004. Test the `ipalib.plugable.API.bootstrap` method.
  1005. """
  1006. > o, _home = create_test_api()
  1007.  
  1008. test_ipalib/test_plugable.py:251:
  1009. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1010. util.py:523: in create_test_api
  1011. api = ipalib.create_api(mode='unit_test')
  1012. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1013.  
  1014. mode = 'unit_test'
  1015.  
  1016. def create_api(mode='dummy'):
  1017. """
  1018. Return standard `plugable.API` instance.
  1019.  
  1020. This standard instance allows plugins that subclass from the following
  1021. base classes:
  1022.  
  1023. - `frontend.Command`
  1024.  
  1025. - `frontend.Object`
  1026.  
  1027. - `frontend.Method`
  1028.  
  1029. - `backend.Backend`
  1030. """
  1031. api = API()
  1032. if mode is not None:
  1033. > api.env.mode = mode
  1034. E AttributeError: 'API' object has no attribute 'env'
  1035.  
  1036. ../ipalib/__init__.py:947: AttributeError
  1037. _________________________________ test_API.test_load_plugins _________________________________
  1038.  
  1039. self = <ipatests.test_ipalib.test_plugable.test_API object at 0x7fce038a6a10>
  1040.  
  1041. def test_load_plugins(self):
  1042. """
  1043. Test the `ipalib.plugable.API.load_plugins` method.
  1044. """
  1045. > o, _home = create_test_api()
  1046.  
  1047. test_ipalib/test_plugable.py:267:
  1048. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1049. util.py:523: in create_test_api
  1050. api = ipalib.create_api(mode='unit_test')
  1051. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1052.  
  1053. mode = 'unit_test'
  1054.  
  1055. def create_api(mode='dummy'):
  1056. """
  1057. Return standard `plugable.API` instance.
  1058.  
  1059. This standard instance allows plugins that subclass from the following
  1060. base classes:
  1061.  
  1062. - `frontend.Command`
  1063.  
  1064. - `frontend.Object`
  1065.  
  1066. - `frontend.Method`
  1067.  
  1068. - `backend.Backend`
  1069. """
  1070. api = API()
  1071. if mode is not None:
  1072. > api.env.mode = mode
  1073. E AttributeError: 'API' object has no attribute 'env'
  1074.  
  1075. ../ipalib/__init__.py:947: AttributeError
  1076. ________________________________ test_xmlclient.test_forward _________________________________
  1077.  
  1078. self = <ipatests.test_ipalib.test_rpc.test_xmlclient object at 0x7fce038a6d90>
  1079.  
  1080. def test_forward(self):
  1081. """
  1082. Test the `ipalib.rpc.xmlclient.forward` method.
  1083. """
  1084. class user_add(Command):
  1085. pass
  1086.  
  1087. > o, _api, _home = self.instance('Backend', user_add, in_server=False)
  1088.  
  1089. test_ipalib/test_rpc.py:213:
  1090. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1091. util.py:561: in instance
  1092. (api, home) = self.finalize(*plugins, **kw)
  1093. util.py:556: in finalize
  1094. (api, home) = self.register(*plugins, **kw)
  1095. util.py:549: in register
  1096. (api, home) = create_test_api(**kw)
  1097. util.py:523: in create_test_api
  1098. api = ipalib.create_api(mode='unit_test')
  1099. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1100.  
  1101. mode = 'unit_test'
  1102.  
  1103. def create_api(mode='dummy'):
  1104. """
  1105. Return standard `plugable.API` instance.
  1106.  
  1107. This standard instance allows plugins that subclass from the following
  1108. base classes:
  1109.  
  1110. - `frontend.Command`
  1111.  
  1112. - `frontend.Object`
  1113.  
  1114. - `frontend.Method`
  1115.  
  1116. - `backend.Backend`
  1117. """
  1118. api = API()
  1119. if mode is not None:
  1120. > api.env.mode = mode
  1121. E AttributeError: 'API' object has no attribute 'env'
  1122.  
  1123. ../ipalib/__init__.py:947: AttributeError
  1124. ___________________________ test_xmlserver.test_marshaled_dispatch ___________________________
  1125.  
  1126. self = <ipatests.test_ipaserver.test_rpcserver.test_xmlserver object at 0x7fce0373ef50>
  1127.  
  1128. def test_marshaled_dispatch(self): # FIXME
  1129. > self.instance('Backend', in_server=True)
  1130.  
  1131. /usr/lib/python2.7/site-packages/ipatests/test_ipaserver/test_rpcserver.py:197:
  1132. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1133. /usr/lib/python2.7/site-packages/ipatests/util.py:561: in instance
  1134. (api, home) = self.finalize(*plugins, **kw)
  1135. /usr/lib/python2.7/site-packages/ipatests/util.py:556: in finalize
  1136. (api, home) = self.register(*plugins, **kw)
  1137. /usr/lib/python2.7/site-packages/ipatests/util.py:549: in register
  1138. (api, home) = create_test_api(**kw)
  1139. /usr/lib/python2.7/site-packages/ipatests/util.py:523: in create_test_api
  1140. api = ipalib.create_api(mode='unit_test')
  1141. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1142.  
  1143. mode = 'unit_test'
  1144.  
  1145. def create_api(mode='dummy'):
  1146. """
  1147. Return standard `plugable.API` instance.
  1148.  
  1149. This standard instance allows plugins that subclass from the following
  1150. base classes:
  1151.  
  1152. - `frontend.Command`
  1153.  
  1154. - `frontend.Object`
  1155.  
  1156. - `frontend.Method`
  1157.  
  1158. - `backend.Backend`
  1159. """
  1160. api = API()
  1161. if mode is not None:
  1162. > api.env.mode = mode
  1163. E AttributeError: 'API' object has no attribute 'env'
  1164.  
  1165. /usr/lib/python2.7/site-packages/ipalib/__init__.py:947: AttributeError
  1166. _______________________________ test_jsonserver.test_unmarshal _______________________________
  1167.  
  1168. self = <ipatests.test_ipaserver.test_rpcserver.test_jsonserver object at 0x7fce03551050>
  1169.  
  1170. def test_unmarshal(self):
  1171. """
  1172. Test the `ipaserver.rpcserver.jsonserver.unmarshal` method.
  1173. """
  1174. > o, _api, _home = self.instance('Backend', in_server=True)
  1175.  
  1176. /usr/lib/python2.7/site-packages/ipatests/test_ipaserver/test_rpcserver.py:211:
  1177. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1178. /usr/lib/python2.7/site-packages/ipatests/util.py:561: in instance
  1179. (api, home) = self.finalize(*plugins, **kw)
  1180. /usr/lib/python2.7/site-packages/ipatests/util.py:556: in finalize
  1181. (api, home) = self.register(*plugins, **kw)
  1182. /usr/lib/python2.7/site-packages/ipatests/util.py:549: in register
  1183. (api, home) = create_test_api(**kw)
  1184. /usr/lib/python2.7/site-packages/ipatests/util.py:523: in create_test_api
  1185. api = ipalib.create_api(mode='unit_test')
  1186. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1187.  
  1188. mode = 'unit_test'
  1189.  
  1190. def create_api(mode='dummy'):
  1191. """
  1192. Return standard `plugable.API` instance.
  1193.  
  1194. This standard instance allows plugins that subclass from the following
  1195. base classes:
  1196.  
  1197. - `frontend.Command`
  1198.  
  1199. - `frontend.Object`
  1200.  
  1201. - `frontend.Method`
  1202.  
  1203. - `backend.Backend`
  1204. """
  1205. api = API()
  1206. if mode is not None:
  1207. > api.env.mode = mode
  1208. E AttributeError: 'API' object has no attribute 'env'
  1209.  
  1210. /usr/lib/python2.7/site-packages/ipalib/__init__.py:947: AttributeError
  1211. 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]
  1212.  
  1213. self = <ipatests.test_xmlrpc.test_dns_plugin.test_forwardzone_delegation_warnings object at 0x7fce013e6b10>
  1214. index = 7
  1215. 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"}
  1216.  
  1217. def test_command(self, index, declarative_test_definition):
  1218. """Run an individual test
  1219.  
  1220. The arguments are provided by the pytest plugin.
  1221. """
  1222. if callable(declarative_test_definition):
  1223. declarative_test_definition(self)
  1224. else:
  1225. > self.check(**declarative_test_definition)
  1226.  
  1227. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:318:
  1228. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1229. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:330: in check
  1230. self.check_output(nice, cmd, args, options, expected, extra_check)
  1231. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:378: in check_output
  1232. got = api.Command[cmd](*args, **options)
  1233. /usr/lib/python2.7/site-packages/ipalib/frontend.py:447: in __call__
  1234. return self.__do_call(*args, **options)
  1235. /usr/lib/python2.7/site-packages/ipalib/frontend.py:475: in __do_call
  1236. ret = self.run(*args, **options)
  1237. /usr/lib/python2.7/site-packages/ipalib/frontend.py:799: in run
  1238. return self.forward(*args, **options)
  1239. /usr/lib/python2.7/site-packages/ipalib/frontend.py:822: in forward
  1240. *args, **kw)
  1241. /usr/lib/python2.7/site-packages/ipalib/rpc.py:990: in forward
  1242. return self._call_command(command, params)
  1243. /usr/lib/python2.7/site-packages/ipalib/rpc.py:971: in _call_command
  1244. return command(*params)
  1245. /usr/lib/python2.7/site-packages/ipalib/rpc.py:1121: in _call
  1246. return self.__request(name, args)
  1247. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1248.  
  1249. self = <ipalib.rpc.JSONServerProxy object at 0x7fce013e6150>, name = 'dnsrecord_add/1'
  1250. args = ((<DNS name sub.dnszone.test.>, <DNS name fw>), {'nsrecord': ('vm-025.abc.idm.lab.eng.brq.redhat.com.',), 'version': '2.216'})
  1251.  
  1252. def __request(self, name, args):
  1253. payload = {'method': unicode(name), 'params': args, 'id': 0}
  1254. version = args[1].get('version', VERSION_WITHOUT_CAPABILITIES)
  1255. payload = json_encode_binary(payload, version)
  1256.  
  1257. if self.__verbose >= 2:
  1258. root_logger.info('Request: %s',
  1259. json.dumps(payload, sort_keys=True, indent=4))
  1260.  
  1261. response = self.__transport.request(
  1262. self.__host,
  1263. self.__handler,
  1264. json.dumps(payload).encode('utf-8'),
  1265. verbose=self.__verbose >= 3,
  1266. )
  1267.  
  1268. try:
  1269. response = json_decode_binary(json.loads(response.decode('ascii')))
  1270. except ValueError as e:
  1271. raise JSONError(error=str(e))
  1272.  
  1273. if self.__verbose >= 2:
  1274. root_logger.info(
  1275. 'Response: %s',
  1276. json.dumps(json_encode_binary(response, version),
  1277. sort_keys=True, indent=4)
  1278. )
  1279. error = response.get('error')
  1280. if error:
  1281. try:
  1282. error_class = errors_by_code[error['code']]
  1283. except KeyError:
  1284. raise UnknownError(
  1285. code=error.get('code'),
  1286. error=error.get('message'),
  1287. server=self.__host,
  1288. )
  1289. else:
  1290. kw = error.get('data', {})
  1291. kw['message'] = error['message']
  1292. > raise error_class(**kw)
  1293. E NotFound: Nameserver 'vm-025.abc.idm.lab.eng.brq.redhat.com.' does not have a corresponding A/AAAA record
  1294.  
  1295. /usr/lib/python2.7/site-packages/ipalib/rpc.py:1115: NotFound
  1296. test_forwardzone_delegation_warnings.test_command[0009: dnszone_enable: Enable zone u'sub.dnszone.test.']
  1297.  
  1298. self = <ipatests.test_xmlrpc.test_dns_plugin.test_forwardzone_delegation_warnings object at 0x7fce013b1110>
  1299. index = 9
  1300. 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.'"}
  1301.  
  1302. def test_command(self, index, declarative_test_definition):
  1303. """Run an individual test
  1304.  
  1305. The arguments are provided by the pytest plugin.
  1306. """
  1307. if callable(declarative_test_definition):
  1308. declarative_test_definition(self)
  1309. else:
  1310. > self.check(**declarative_test_definition)
  1311.  
  1312. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:318:
  1313. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1314. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:330: in check
  1315. self.check_output(nice, cmd, args, options, expected, extra_check)
  1316. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:379: in check_output
  1317. assert_deepequal(expected, got, nice)
  1318. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1319.  
  1320. expected = {'result': True, 'summary': 'Enabled DNS zone "sub.dnszone.test."', 'value': <DNS name sub.dnszone.test.>}
  1321. 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.>}
  1322. doc = "0009: dnszone_enable: Enable zone u'sub.dnszone.test.'", stack = ()
  1323.  
  1324. def assert_deepequal(expected, got, doc='', stack=tuple()):
  1325. """
  1326. Recursively check for type and equality.
  1327.  
  1328. If a value in expected is callable then it will used as a callback to
  1329. test for equality on the got value. The callback is passed the got
  1330. value and returns True if equal, False otherwise.
  1331.  
  1332. If the tests fails, it will raise an ``AssertionError`` with detailed
  1333. information, including the path to the offending value. For example:
  1334.  
  1335. >>> expected = [u'Hello', dict(world=u'how are you?')]
  1336. >>> got = [u'Hello', dict(world='how are you?')]
  1337. >>> expected == got
  1338. True
  1339. >>> assert_deepequal(expected, got, doc='Testing my nested data')
  1340. Traceback (most recent call last):
  1341. ...
  1342. AssertionError: assert_deepequal: type(expected) is not type(got).
  1343. Testing my nested data
  1344. type(expected) = <type 'unicode'>
  1345. type(got) = <type 'str'>
  1346. expected = u'how are you?'
  1347. got = 'how are you?'
  1348. path = (0, 'world')
  1349.  
  1350. Note that lists and tuples are considered equivalent, and the order of
  1351. their elements does not matter.
  1352. """
  1353. try:
  1354. pretty_print = pytest.config.getoption("pretty_print") # pylint: disable=no-member
  1355. except AttributeError:
  1356. pretty_print = False
  1357.  
  1358. if pretty_print:
  1359. expected_str = struct_to_string(expected, EXPECTED_LEN)
  1360. got_str = struct_to_string(got, GOT_LEN)
  1361. else:
  1362. expected_str = repr(expected)
  1363. got_str = repr(got)
  1364.  
  1365. if isinstance(expected, tuple):
  1366. expected = list(expected)
  1367. if isinstance(got, tuple):
  1368. got = list(got)
  1369. if isinstance(expected, DN):
  1370. if isinstance(got, six.string_types):
  1371. got = DN(got)
  1372. if not (isinstance(expected, Fuzzy) or callable(expected) or type(expected) is type(got)):
  1373. raise AssertionError(
  1374. TYPE % (doc, type(expected), type(got), expected, got, stack)
  1375. )
  1376. if isinstance(expected, (list, tuple)):
  1377. if len(expected) != len(got):
  1378. raise AssertionError(
  1379. LEN % (doc, len(expected), len(got), expected_str, got_str,
  1380. stack)
  1381. )
  1382. # Sort list elements, unless they are dictionaries
  1383. if expected and isinstance(expected[0], dict):
  1384. s_got = got
  1385. s_expected = expected
  1386. else:
  1387. try:
  1388. s_got = sorted(got)
  1389. except TypeError:
  1390. s_got = got
  1391. try:
  1392. s_expected = sorted(expected)
  1393. except TypeError:
  1394. s_expected = expected
  1395. for (i, e_sub) in enumerate(s_expected):
  1396. g_sub = s_got[i]
  1397. assert_deepequal(e_sub, g_sub, doc, stack + (i,))
  1398. elif isinstance(expected, dict):
  1399. missing = set(expected).difference(got)
  1400. extra = set(got).difference(expected)
  1401. if missing or extra:
  1402. raise AssertionError(KEYS % (
  1403. doc, sorted(missing), sorted(extra), expected_str, got_str,
  1404. > stack)
  1405. )
  1406. E AssertionError: assert_deepequal: dict keys mismatch.
  1407. E 0009: dnszone_enable: Enable zone u'sub.dnszone.test.'
  1408. E missing keys = []
  1409. E extra keys = [u'messages']
  1410. E expected = {'result': True,
  1411. E 'summary': u'Enabled DNS zone "sub.dnszone.test."',
  1412. E 'value': <DNS name sub.dnszone.test.>}
  1413. E got = {u'messages': ({u'code': 13008,
  1414. E u'data': {u'authzone': u'sub.dnszone.test.',
  1415. E u'fwzone': u'fw.sub.dnszone.test.',
  1416. E u'ns_rec': u'fw'},
  1417. 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.".',
  1418. E u'name': u'ForwardzoneIsNotEffectiveWarning',
  1419. E u'type': u'warning'},),
  1420. E u'result': True,
  1421. E u'summary': u'Enabled DNS zone "sub.dnszone.test."',
  1422. E u'value': <DNS name sub.dnszone.test.>}
  1423. E path = ()
  1424.  
  1425. /usr/lib/python2.7/site-packages/ipatests/util.py:384: AssertionError
  1426. 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.')]
  1427.  
  1428. self = <ipatests.test_xmlrpc.test_dns_plugin.test_forwardzone_delegation_warnings object at 0x7fce013e6610>
  1429. index = 10
  1430. 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.')"}
  1431.  
  1432. def test_command(self, index, declarative_test_definition):
  1433. """Run an individual test
  1434.  
  1435. The arguments are provided by the pytest plugin.
  1436. """
  1437. if callable(declarative_test_definition):
  1438. declarative_test_definition(self)
  1439. else:
  1440. > self.check(**declarative_test_definition)
  1441.  
  1442. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:318:
  1443. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1444. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:330: in check
  1445. self.check_output(nice, cmd, args, options, expected, extra_check)
  1446. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:378: in check_output
  1447. got = api.Command[cmd](*args, **options)
  1448. /usr/lib/python2.7/site-packages/ipalib/frontend.py:447: in __call__
  1449. return self.__do_call(*args, **options)
  1450. /usr/lib/python2.7/site-packages/ipalib/frontend.py:475: in __do_call
  1451. ret = self.run(*args, **options)
  1452. /usr/lib/python2.7/site-packages/ipalib/frontend.py:799: in run
  1453. return self.forward(*args, **options)
  1454. /usr/lib/python2.7/site-packages/ipalib/frontend.py:822: in forward
  1455. *args, **kw)
  1456. /usr/lib/python2.7/site-packages/ipalib/rpc.py:990: in forward
  1457. return self._call_command(command, params)
  1458. /usr/lib/python2.7/site-packages/ipalib/rpc.py:971: in _call_command
  1459. return command(*params)
  1460. /usr/lib/python2.7/site-packages/ipalib/rpc.py:1121: in _call
  1461. return self.__request(name, args)
  1462. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1463.  
  1464. self = <ipalib.rpc.JSONServerProxy object at 0x7fce013e6150>, name = 'dnsrecord_del/1'
  1465. args = ((<DNS name sub.dnszone.test.>, <DNS name fw>), {'del_all': True, 'version': '2.216'})
  1466.  
  1467. def __request(self, name, args):
  1468. payload = {'method': unicode(name), 'params': args, 'id': 0}
  1469. version = args[1].get('version', VERSION_WITHOUT_CAPABILITIES)
  1470. payload = json_encode_binary(payload, version)
  1471.  
  1472. if self.__verbose >= 2:
  1473. root_logger.info('Request: %s',
  1474. json.dumps(payload, sort_keys=True, indent=4))
  1475.  
  1476. response = self.__transport.request(
  1477. self.__host,
  1478. self.__handler,
  1479. json.dumps(payload).encode('utf-8'),
  1480. verbose=self.__verbose >= 3,
  1481. )
  1482.  
  1483. try:
  1484. response = json_decode_binary(json.loads(response.decode('ascii')))
  1485. except ValueError as e:
  1486. raise JSONError(error=str(e))
  1487.  
  1488. if self.__verbose >= 2:
  1489. root_logger.info(
  1490. 'Response: %s',
  1491. json.dumps(json_encode_binary(response, version),
  1492. sort_keys=True, indent=4)
  1493. )
  1494. error = response.get('error')
  1495. if error:
  1496. try:
  1497. error_class = errors_by_code[error['code']]
  1498. except KeyError:
  1499. raise UnknownError(
  1500. code=error.get('code'),
  1501. error=error.get('message'),
  1502. server=self.__host,
  1503. )
  1504. else:
  1505. kw = error.get('data', {})
  1506. kw['message'] = error['message']
  1507. > raise error_class(**kw)
  1508. E NotFound: fw: DNS resource record not found
  1509.  
  1510. /usr/lib/python2.7/site-packages/ipalib/rpc.py:1115: NotFound
  1511. 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]
  1512.  
  1513. self = <ipatests.test_xmlrpc.test_dns_plugin.test_forwardzone_delegation_warnings object at 0x7fce013ed5d0>
  1514. index = 12
  1515. 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"}
  1516.  
  1517. def test_command(self, index, declarative_test_definition):
  1518. """Run an individual test
  1519.  
  1520. The arguments are provided by the pytest plugin.
  1521. """
  1522. if callable(declarative_test_definition):
  1523. declarative_test_definition(self)
  1524. else:
  1525. > self.check(**declarative_test_definition)
  1526.  
  1527. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:318:
  1528. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1529. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:330: in check
  1530. self.check_output(nice, cmd, args, options, expected, extra_check)
  1531. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:378: in check_output
  1532. got = api.Command[cmd](*args, **options)
  1533. /usr/lib/python2.7/site-packages/ipalib/frontend.py:447: in __call__
  1534. return self.__do_call(*args, **options)
  1535. /usr/lib/python2.7/site-packages/ipalib/frontend.py:475: in __do_call
  1536. ret = self.run(*args, **options)
  1537. /usr/lib/python2.7/site-packages/ipalib/frontend.py:799: in run
  1538. return self.forward(*args, **options)
  1539. /usr/lib/python2.7/site-packages/ipalib/frontend.py:822: in forward
  1540. *args, **kw)
  1541. /usr/lib/python2.7/site-packages/ipalib/rpc.py:990: in forward
  1542. return self._call_command(command, params)
  1543. /usr/lib/python2.7/site-packages/ipalib/rpc.py:971: in _call_command
  1544. return command(*params)
  1545. /usr/lib/python2.7/site-packages/ipalib/rpc.py:1121: in _call
  1546. return self.__request(name, args)
  1547. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1548.  
  1549. self = <ipalib.rpc.JSONServerProxy object at 0x7fce013e6150>, name = 'dnsrecord_add/1'
  1550. args = ((<DNS name sub.dnszone.test.>, <DNS name fw.sub2>), {'nsrecord': ('vm-025.abc.idm.lab.eng.brq.redhat.com.',), 'version': '2.216'})
  1551.  
  1552. def __request(self, name, args):
  1553. payload = {'method': unicode(name), 'params': args, 'id': 0}
  1554. version = args[1].get('version', VERSION_WITHOUT_CAPABILITIES)
  1555. payload = json_encode_binary(payload, version)
  1556.  
  1557. if self.__verbose >= 2:
  1558. root_logger.info('Request: %s',
  1559. json.dumps(payload, sort_keys=True, indent=4))
  1560.  
  1561. response = self.__transport.request(
  1562. self.__host,
  1563. self.__handler,
  1564. json.dumps(payload).encode('utf-8'),
  1565. verbose=self.__verbose >= 3,
  1566. )
  1567.  
  1568. try:
  1569. response = json_decode_binary(json.loads(response.decode('ascii')))
  1570. except ValueError as e:
  1571. raise JSONError(error=str(e))
  1572.  
  1573. if self.__verbose >= 2:
  1574. root_logger.info(
  1575. 'Response: %s',
  1576. json.dumps(json_encode_binary(response, version),
  1577. sort_keys=True, indent=4)
  1578. )
  1579. error = response.get('error')
  1580. if error:
  1581. try:
  1582. error_class = errors_by_code[error['code']]
  1583. except KeyError:
  1584. raise UnknownError(
  1585. code=error.get('code'),
  1586. error=error.get('message'),
  1587. server=self.__host,
  1588. )
  1589. else:
  1590. kw = error.get('data', {})
  1591. kw['message'] = error['message']
  1592. > raise error_class(**kw)
  1593. E NotFound: Nameserver 'vm-025.abc.idm.lab.eng.brq.redhat.com.' does not have a corresponding A/AAAA record
  1594.  
  1595. /usr/lib/python2.7/site-packages/ipalib/rpc.py:1115: NotFound
  1596. test_forwardzone_delegation_warnings.test_command[0014: dnsforwardzone_enable: Enable forward zone u'fw.sub2.sub.dnszone.test.']
  1597.  
  1598. self = <ipatests.test_xmlrpc.test_dns_plugin.test_forwardzone_delegation_warnings object at 0x7fce01759650>
  1599. index = 14
  1600. 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.'"}
  1601.  
  1602. def test_command(self, index, declarative_test_definition):
  1603. """Run an individual test
  1604.  
  1605. The arguments are provided by the pytest plugin.
  1606. """
  1607. if callable(declarative_test_definition):
  1608. declarative_test_definition(self)
  1609. else:
  1610. > self.check(**declarative_test_definition)
  1611.  
  1612. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:318:
  1613. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1614. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:330: in check
  1615. self.check_output(nice, cmd, args, options, expected, extra_check)
  1616. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:379: in check_output
  1617. assert_deepequal(expected, got, nice)
  1618. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1619.  
  1620. expected = {'result': True, 'summary': 'Enabled DNS forward zone "fw.sub2.sub.dnszone.test."', 'value': <DNS name fw.sub2.sub.dnszone.test.>}
  1621. 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.>}
  1622. doc = "0014: dnsforwardzone_enable: Enable forward zone u'fw.sub2.sub.dnszone.test.'"
  1623. stack = ()
  1624.  
  1625. def assert_deepequal(expected, got, doc='', stack=tuple()):
  1626. """
  1627. Recursively check for type and equality.
  1628.  
  1629. If a value in expected is callable then it will used as a callback to
  1630. test for equality on the got value. The callback is passed the got
  1631. value and returns True if equal, False otherwise.
  1632.  
  1633. If the tests fails, it will raise an ``AssertionError`` with detailed
  1634. information, including the path to the offending value. For example:
  1635.  
  1636. >>> expected = [u'Hello', dict(world=u'how are you?')]
  1637. >>> got = [u'Hello', dict(world='how are you?')]
  1638. >>> expected == got
  1639. True
  1640. >>> assert_deepequal(expected, got, doc='Testing my nested data')
  1641. Traceback (most recent call last):
  1642. ...
  1643. AssertionError: assert_deepequal: type(expected) is not type(got).
  1644. Testing my nested data
  1645. type(expected) = <type 'unicode'>
  1646. type(got) = <type 'str'>
  1647. expected = u'how are you?'
  1648. got = 'how are you?'
  1649. path = (0, 'world')
  1650.  
  1651. Note that lists and tuples are considered equivalent, and the order of
  1652. their elements does not matter.
  1653. """
  1654. try:
  1655. pretty_print = pytest.config.getoption("pretty_print") # pylint: disable=no-member
  1656. except AttributeError:
  1657. pretty_print = False
  1658.  
  1659. if pretty_print:
  1660. expected_str = struct_to_string(expected, EXPECTED_LEN)
  1661. got_str = struct_to_string(got, GOT_LEN)
  1662. else:
  1663. expected_str = repr(expected)
  1664. got_str = repr(got)
  1665.  
  1666. if isinstance(expected, tuple):
  1667. expected = list(expected)
  1668. if isinstance(got, tuple):
  1669. got = list(got)
  1670. if isinstance(expected, DN):
  1671. if isinstance(got, six.string_types):
  1672. got = DN(got)
  1673. if not (isinstance(expected, Fuzzy) or callable(expected) or type(expected) is type(got)):
  1674. raise AssertionError(
  1675. TYPE % (doc, type(expected), type(got), expected, got, stack)
  1676. )
  1677. if isinstance(expected, (list, tuple)):
  1678. if len(expected) != len(got):
  1679. raise AssertionError(
  1680. LEN % (doc, len(expected), len(got), expected_str, got_str,
  1681. stack)
  1682. )
  1683. # Sort list elements, unless they are dictionaries
  1684. if expected and isinstance(expected[0], dict):
  1685. s_got = got
  1686. s_expected = expected
  1687. else:
  1688. try:
  1689. s_got = sorted(got)
  1690. except TypeError:
  1691. s_got = got
  1692. try:
  1693. s_expected = sorted(expected)
  1694. except TypeError:
  1695. s_expected = expected
  1696. for (i, e_sub) in enumerate(s_expected):
  1697. g_sub = s_got[i]
  1698. assert_deepequal(e_sub, g_sub, doc, stack + (i,))
  1699. elif isinstance(expected, dict):
  1700. missing = set(expected).difference(got)
  1701. extra = set(got).difference(expected)
  1702. if missing or extra:
  1703. raise AssertionError(KEYS % (
  1704. doc, sorted(missing), sorted(extra), expected_str, got_str,
  1705. > stack)
  1706. )
  1707. E AssertionError: assert_deepequal: dict keys mismatch.
  1708. E 0014: dnsforwardzone_enable: Enable forward zone u'fw.sub2.sub.dnszone.test.'
  1709. E missing keys = []
  1710. E extra keys = [u'messages']
  1711. E expected = {'result': True,
  1712. E 'summary': u'Enabled DNS forward zone "fw.sub2.sub.dnszone.test."',
  1713. E 'value': <DNS name fw.sub2.sub.dnszone.test.>}
  1714. E got = {u'messages': ({u'code': 13008,
  1715. E u'data': {u'authzone': u'sub.dnszone.test.',
  1716. E u'fwzone': u'fw.sub2.sub.dnszone.test.',
  1717. E u'ns_rec': u'fw.sub2'},
  1718. 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.".',
  1719. E u'name': u'ForwardzoneIsNotEffectiveWarning',
  1720. E u'type': u'warning'},),
  1721. E u'result': True,
  1722. E u'summary': u'Enabled DNS forward zone "fw.sub2.sub.dnszone.test."',
  1723. E u'value': <DNS name fw.sub2.sub.dnszone.test.>}
  1724. E path = ()
  1725.  
  1726. /usr/lib/python2.7/site-packages/ipatests/util.py:384: AssertionError
  1727. 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]
  1728.  
  1729. self = <ipatests.test_xmlrpc.test_dns_plugin.test_forwardzone_delegation_warnings object at 0x7fce0167b050>
  1730. index = 16
  1731. 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"}
  1732.  
  1733. def test_command(self, index, declarative_test_definition):
  1734. """Run an individual test
  1735.  
  1736. The arguments are provided by the pytest plugin.
  1737. """
  1738. if callable(declarative_test_definition):
  1739. declarative_test_definition(self)
  1740. else:
  1741. > self.check(**declarative_test_definition)
  1742.  
  1743. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:318:
  1744. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1745. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:330: in check
  1746. self.check_output(nice, cmd, args, options, expected, extra_check)
  1747. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:378: in check_output
  1748. got = api.Command[cmd](*args, **options)
  1749. /usr/lib/python2.7/site-packages/ipalib/frontend.py:447: in __call__
  1750. return self.__do_call(*args, **options)
  1751. /usr/lib/python2.7/site-packages/ipalib/frontend.py:475: in __do_call
  1752. ret = self.run(*args, **options)
  1753. /usr/lib/python2.7/site-packages/ipalib/frontend.py:799: in run
  1754. return self.forward(*args, **options)
  1755. /usr/lib/python2.7/site-packages/ipalib/frontend.py:822: in forward
  1756. *args, **kw)
  1757. /usr/lib/python2.7/site-packages/ipalib/rpc.py:990: in forward
  1758. return self._call_command(command, params)
  1759. /usr/lib/python2.7/site-packages/ipalib/rpc.py:971: in _call_command
  1760. return command(*params)
  1761. /usr/lib/python2.7/site-packages/ipalib/rpc.py:1121: in _call
  1762. return self.__request(name, args)
  1763. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1764.  
  1765. self = <ipalib.rpc.JSONServerProxy object at 0x7fce013e6150>, name = 'dnsrecord_add/1'
  1766. args = ((<DNS name dnszone.test.>, <DNS name fw.sub2.sub>), {'nsrecord': ('vm-025.abc.idm.lab.eng.brq.redhat.com.',), 'version': '2.216'})
  1767.  
  1768. def __request(self, name, args):
  1769. payload = {'method': unicode(name), 'params': args, 'id': 0}
  1770. version = args[1].get('version', VERSION_WITHOUT_CAPABILITIES)
  1771. payload = json_encode_binary(payload, version)
  1772.  
  1773. if self.__verbose >= 2:
  1774. root_logger.info('Request: %s',
  1775. json.dumps(payload, sort_keys=True, indent=4))
  1776.  
  1777. response = self.__transport.request(
  1778. self.__host,
  1779. self.__handler,
  1780. json.dumps(payload).encode('utf-8'),
  1781. verbose=self.__verbose >= 3,
  1782. )
  1783.  
  1784. try:
  1785. response = json_decode_binary(json.loads(response.decode('ascii')))
  1786. except ValueError as e:
  1787. raise JSONError(error=str(e))
  1788.  
  1789. if self.__verbose >= 2:
  1790. root_logger.info(
  1791. 'Response: %s',
  1792. json.dumps(json_encode_binary(response, version),
  1793. sort_keys=True, indent=4)
  1794. )
  1795. error = response.get('error')
  1796. if error:
  1797. try:
  1798. error_class = errors_by_code[error['code']]
  1799. except KeyError:
  1800. raise UnknownError(
  1801. code=error.get('code'),
  1802. error=error.get('message'),
  1803. server=self.__host,
  1804. )
  1805. else:
  1806. kw = error.get('data', {})
  1807. kw['message'] = error['message']
  1808. > raise error_class(**kw)
  1809. E NotFound: Nameserver 'vm-025.abc.idm.lab.eng.brq.redhat.com.' does not have a corresponding A/AAAA record
  1810.  
  1811. /usr/lib/python2.7/site-packages/ipalib/rpc.py:1115: NotFound
  1812. 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.')]
  1813.  
  1814. self = <ipatests.test_xmlrpc.test_dns_plugin.test_forwardzone_delegation_warnings object at 0x7fce016e4410>
  1815. index = 17
  1816. 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.')"}
  1817.  
  1818. def test_command(self, index, declarative_test_definition):
  1819. """Run an individual test
  1820.  
  1821. The arguments are provided by the pytest plugin.
  1822. """
  1823. if callable(declarative_test_definition):
  1824. declarative_test_definition(self)
  1825. else:
  1826. > self.check(**declarative_test_definition)
  1827.  
  1828. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:318:
  1829. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1830. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:330: in check
  1831. self.check_output(nice, cmd, args, options, expected, extra_check)
  1832. /usr/lib/python2.7/site-packages/ipatests/test_xmlrpc/xmlrpc_test.py:378: in check_output
  1833. got = api.Command[cmd](*args, **options)
  1834. /usr/lib/python2.7/site-packages/ipalib/frontend.py:447: in __call__
  1835. return self.__do_call(*args, **options)
  1836. /usr/lib/python2.7/site-packages/ipalib/frontend.py:475: in __do_call
  1837. ret = self.run(*args, **options)
  1838. /usr/lib/python2.7/site-packages/ipalib/frontend.py:799: in run
  1839. return self.forward(*args, **options)
  1840. /usr/lib/python2.7/site-packages/ipalib/frontend.py:822: in forward
  1841. *args, **kw)
  1842. /usr/lib/python2.7/site-packages/ipalib/rpc.py:990: in forward
  1843. return self._call_command(command, params)
  1844. /usr/lib/python2.7/site-packages/ipalib/rpc.py:971: in _call_command
  1845. return command(*params)
  1846. /usr/lib/python2.7/site-packages/ipalib/rpc.py:1121: in _call
  1847. return self.__request(name, args)
  1848. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1849.  
  1850. self = <ipalib.rpc.JSONServerProxy object at 0x7fce013e6150>, name = 'dnsrecord_mod/1'
  1851. args = ((<DNS name dnszone.test.>, <DNS name fw.sub2.sub>), {'nsrecord': None, 'version': '2.216'})
  1852.  
  1853. def __request(self, name, args):
  1854. payload = {'method': unicode(name), 'params': args, 'id': 0}
  1855. version = args[1].get('version', VERSION_WITHOUT_CAPABILITIES)
  1856. payload = json_encode_binary(payload, version)
  1857.  
  1858. if self.__verbose >= 2:
  1859. root_logger.info('Request: %s',
  1860. json.dumps(payload, sort_keys=True, indent=4))
  1861.  
  1862. response = self.__transport.request(
  1863. self.__host,
  1864. self.__handler,
  1865. json.dumps(payload).encode('utf-8'),
  1866. verbose=self.__verbose >= 3,
  1867. )
  1868.  
  1869. try:
  1870. response = json_decode_binary(json.loads(response.decode('ascii')))
  1871. except ValueError as e:
  1872. raise JSONError(error=str(e))
  1873.  
  1874. if self.__verbose >= 2:
  1875. root_logger.info(
  1876. 'Response: %s',
  1877. json.dumps(json_encode_binary(response, version),
  1878. sort_keys=True, indent=4)
  1879. )
  1880. error = response.get('error')
  1881. if error:
  1882. try:
  1883. error_class = errors_by_code[error['code']]
  1884. except KeyError:
  1885. raise UnknownError(
  1886. code=error.get('code'),
  1887. error=error.get('message'),
  1888. server=self.__host,
  1889. )
  1890. else:
  1891. kw = error.get('data', {})
  1892. kw['message'] = error['message']
  1893. > raise error_class(**kw)
  1894. E NotFound: fw.sub2.sub: DNS resource record not found
  1895.  
  1896. /usr/lib/python2.7/site-packages/ipalib/rpc.py:1115: NotFound
  1897. ========== 33 failed, 2460 passed, 82 skipped, 1 pytest-warnings in 2367.26 seconds ==========
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement