Christian Heimes
fd1b4f6ec9
Add options to run only ipaclient unittests
...
A new option for ipa-run-tests makes the test runner ignore
subdirectories or skips tests that depend on the ipaserver package or on
a running framework for RPC integration tests. The new option enables
testing of client-only builds.
$ ipatests/ipa-run-tests --ipaclient-unittests
...
platform linux2 -- Python 2.7.13, pytest-2.9.2, py-1.4.32, pluggy-0.3.1
rootdir: /home/heimes/redhat, inifile: tox.ini
plugins: sourceorder-0.5, cov-2.3.0, betamax-0.7.1, multihost-1.1
collected 451 items
test_util.py ........
util.py ..
test_ipaclient/test_csrgen.py ..............ssss...
test_ipalib/test_aci.py ...................
test_ipalib/test_backend.py ........
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 ...............
test_ipalib/test_errors.py .......
test_ipalib/test_frontend.py ........................................
test_ipalib/test_messages.py ....
test_ipalib/test_output.py ...
test_ipalib/test_parameters.py .............................................................
test_ipalib/test_plugable.py ........
test_ipalib/test_rpc.py ......ssssssss
test_ipalib/test_text.py .............................
test_ipalib/test_x509.py ...
test_ipapython/test_cookie.py ............
test_ipapython/test_dn.py ...........................
test_ipapython/test_ipautil.py ..................................................................
test_ipapython/test_ipavalidate.py ..........
test_ipapython/test_kerberos.py ..............
test_ipapython/test_keyring.py ..........
test_ipapython/test_ssh.py ...............................
test_pkcs10/test_pkcs10.py .....
https://fedorahosted.org/freeipa/ticket/6517
Signed-off-by: Christian Heimes <cheimes@redhat.com >
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com >
2017-03-17 15:02:13 +01:00
Jan Cholasta
0d370a959b
pylint: enable the import-error check
...
Check for import errors with pylint to make sure new python package
dependencies are not overlooked.
https://fedorahosted.org/freeipa/ticket/6418
Reviewed-By: Petr Spacek <pspacek@redhat.com >
Reviewed-By: Martin Basti <mbasti@redhat.com >
2016-10-24 14:11:08 +02:00
Martin Basti
49b29591aa
Pylint: remove unused variables in tests
...
Reviewed-By: Pavel Vomacka <pvomacka@redhat.com >
2016-10-11 16:50:32 +02:00
Martin Basti
45e3aee352
Pylint: enable check for unused-variables
...
Unused variables may:
* make code less readable
* create dead code
* potentialy hide issues/errors
Enabled check should prevent to leave unused variable in code
Check is locally disabled for modules that fix is not clear or easy or have too many occurences of
unused variables
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com >
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com >
2016-09-27 13:35:58 +02:00
Jan Barta
f252f50987
pylint: fix bad-classmethod-argument
...
Reviewed-By: Tomas Krizek <tkrizek@redhat.com >
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com >
2016-09-22 16:52:57 +02:00
Lenka Doudova
3c32af55b6
Tests: Failing test_ipalib/test_rpc
...
Due to thin client implementation a part of the original test is no longer
valid and causes test to fail.
https://fedorahosted.org/freeipa/ticket/6192
Reviewed-By: Martin Basti <mbasti@redhat.com >
2016-08-29 12:46:58 +02:00
Jan Cholasta
56c66f44a0
rpc: specify connection options in API config
...
Specify RPC connection options once in API.bootstrap rather than in each
invocation of rpcclient.connect.
https://fedorahosted.org/freeipa/ticket/4739
Reviewed-By: David Kupka <dkupka@redhat.com >
2016-06-03 09:00:34 +02:00
Petr Viktorin
8a2b65a357
Fix more bytes/unicode issues
...
Reviewed-By: Tomas Babej <tbabej@redhat.com >
2015-10-22 18:34:46 +02:00
Petr Viktorin
f82d3da1e8
Appease pylint
...
Reviewed-By: David Kupka <dkupka@redhat.com >
Reviewed-By: Jan Cholasta <jcholast@redhat.com >
Reviewed-By: Martin Basti <mbasti@redhat.com >
2015-10-07 10:27:20 +02:00
Petr Viktorin
ad2bc94725
Use six.moves.xmlrpc.client instead of xmlrpclib
...
The module is renamed to xmlrpc.client in Python 3.
Reviewed-By: David Kupka <dkupka@redhat.com >
Reviewed-By: Jan Cholasta <jcholast@redhat.com >
Reviewed-By: Martin Basti <mbasti@redhat.com >
2015-10-07 10:27:20 +02:00
Jan Cholasta
33aba6f35e
Use byte literals where appropriate
...
Reviewed-By: Petr Viktorin <pviktori@redhat.com >
2015-09-17 11:08:43 +02:00
Jan Cholasta
ba5201979d
Use bytes instead of str where appropriate
...
Under Python 2, "str" and "bytes" are synonyms.
Reviewed-By: Petr Viktorin <pviktori@redhat.com >
2015-09-17 11:08:43 +02:00
Jan Cholasta
23507e6124
Alias "unicode" to "str" under Python 3
...
The six way of doing this is to replace all occurences of "unicode"
with "six.text_type". However, "unicode" is non-ambiguous and
(arguably) easier to read. Also, using it makes the patches smaller,
which should help with backporting.
Reviewed-By: Petr Viktorin <pviktori@redhat.com >
2015-09-17 11:08:43 +02:00
Petr Viktorin
8de13bd7dd
Use the print function
...
In Python 3, `print` is no longer a statement. Call it as a function
everywhere, and include the future import to remove the statement
in Python 2 code as well.
Reviewed-By: Christian Heimes <cheimes@redhat.com >
Reviewed-By: Jan Cholasta <jcholast@redhat.com >
2015-09-01 11:42:01 +02:00
Petr Viktorin
27dabb4528
Modernize 'except' clauses
...
The 'as' syntax works from Python 2 on, and Python 3 will
drop the "comma" syntax.
Reviewed-By: Tomas Babej <tbabej@redhat.com >
2015-08-12 18:17:23 +02:00
Tomas Babej
d71899696a
tests: test_rpc: Create connection for the current thread
...
Both context.xmlclient and context.xmlclient_<id> need to be created
in order to successfully call the Command.forward method.
Reviewed-By: Martin Basti <mbasti@redhat.com >
2015-07-22 11:13:44 +02:00
Petr Viktorin
375e9f7c4b
tests: Use PEP8-compliant setup/teardown method names
...
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 >
2014-11-21 12:14:44 +01:00
Jan Cholasta
8b6dc819d5
Support API version-specific RPC marshalling.
...
Reviewed-By: Tomas Babej <tbabej@redhat.com >
2014-04-18 14:59:20 +02:00
Petr Viktorin
6bdc75ea24
Implement XML introspection
...
https://fedorahosted.org/freeipa/ticket/2937
2014-01-14 13:41:19 +01:00
Petr Viktorin
c60142efda
Make an ipa-tests package
...
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
2013-06-17 19:22:50 +02:00