summaryrefslogtreecommitdiffstats
path: root/ipatests/test_xmlrpc/xmlrpc_test.py
Commit message (Collapse)AuthorAgeFilesLines
* test_host_plugin: Use HostTracker fixturesPetr Viktorin2015-01-141-29/+0
| | | | | | | | | | | | The racker object "remembers" expected state across several tests, so only changes (rather than all expected state) need to be specified in each test. Also, the tracker fixture will make it easy to use hosts in other test modules. This change makes the tests independent; any permutation of any subset of these tests should now pass. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* test_host_plugin: Convert tests to imperative stylePetr Viktorin2015-01-141-0/+55
| | | | | | | | | | | This has several advantages: - Tests other than run-command/check-response can be added easily - Tracebacks are meaningful (which means we'll be able to remove a lot of test name/description/location tracking code) - Individual tests can be selected/deselected using normal pytest mechanisms (but for isolated tests, more changes will be needed) Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Declarative tests: Switch to pytestPetr Viktorin2014-11-211-19/+7
| | | | | | | | | | Provide a local pytest plugin to generate tests. The Declarative tests can now only be run with pytest https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Declarative tests: Move cleanup to setup_class/teardown_classPetr Viktorin2014-11-211-19/+16
| | | | | | https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Use setup_class/teardown_class in Declarative testsPetr Viktorin2014-11-211-6/+2
| | | | | | | | | | Pytest will consider each Declarative test individually, running setup/teardown for each one. Move the setup and teardown to the class level. https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* tests: Use PEP8-compliant setup/teardown method namesPetr Viktorin2014-11-211-3/+3
| | | | | | | | | | | | The setUp/dearDown names are used in the unittest module, but there is no reason to use them in non-`unittest` test cases. Nose supports both styles (but mixing them can cause trouble when calling super()'s methods). Pytest only supports the new ones. https://fedorahosted.org/freeipa/ticket/4610 Reviewed-By: Tomas Babej <tbabej@redhat.com>
* ipatests: Cover DateTime in test_parameters.pyTomas Babej2014-05-051-1/+2
| | | | | | | | | Adds tests for newly added DateTime parameter, focusing on conversion of accepted datetime formats. Part of: https://fedorahosted.org/freeipa/ticket/3306 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* automember rebuild nowait feature addedAdam Misnyovszki2014-04-091-0/+10
| | | | | | | | | | | | | | | automember-rebuild uses asynchronous 389 task, and returned success even if the task didn't run. this patch fixes this issue adding a --nowait parameter to 'ipa automember-rebuild', defaulting to False, thus when the script runs without it, it waits for the 'nstaskexitcode' attribute, which means the task has finished. Old usage can be enabled using --nowait, and returns the DN of the task for further polling. New tests added also. https://fedorahosted.org/freeipa/ticket/4239 Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* Make it possible to call custom functions in Declarative testsPetr Viktorin2014-02-121-5/+12
| | | | | | | | | Sometimes, we will want to do more than just call IPA commands and check the output. This patch makes it possible to add arbitrary functions to Declarative tests. They will be called as part of the sequence of tests. Reviewed-By: Martin Kosek <mkosek@redhat.com>
* Allow Declarative test classes to specify the API versionPetr Viktorin2013-12-131-1/+2
| | | | This makes it possible to test behavior with older clients.
* Switch client to JSON-RPCPetr Viktorin2013-11-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Modify ipalib.rpc to support JSON-RPC in addition to XML-RPC. This is done by subclassing and extending xmlrpclib, because our existing code relies on xmlrpclib internals. The URI to use is given in the new jsonrpc_uri env variable. When it is not given, it is generated from xmlrpc_uri by replacing /xml with /json. The rpc_json_uri env variable existed before, but was unused, undocumented and not set the install scripts. This patch removes it in favor of jsonrpc_uri (for consistency with xmlrpc_uri). Add the rpc_protocol env variable to control the protocol IPA uses. rpc_protocol defaults to 'jsonrpc', but may be changed to 'xmlrpc'. Make backend.Executioner and tests use the backend specified by rpc_protocol. For compatibility with unwrap_xml, decoding JSON now gives tuples instead of lists. Design: http://freeipa.org/page/V3/JSON-RPC Ticket: https://fedorahosted.org/freeipa/ticket/3299
* Fix tests which fail after ipa-adtrust-installAna Krivokapic2013-08-281-4/+18
| | | | | | | | | | Some unit tests were failing after ipa-adtrust-install has been run on the IPA server, due to missing attributes ('ipantsecurityidentifier') and objectclasses ('ipantuserattrs' and 'ipantgroupattrs'). This patch detects if ipa-adtrust-install has been run, and adds missing attributes and objectclasses where appropriate. https://fedorahosted.org/freeipa/ticket/3852
* Make an ipa-tests packagePetr Viktorin2013-06-171-0/+329
Rename the 'tests' directory to 'ipa-tests', and create an ipa-tests RPM containing the test suite Part of the work for: https://fedorahosted.org/freeipa/ticket/3654