summaryrefslogtreecommitdiffstats
path: root/tests/unit/test_utils.py
Commit message (Collapse)AuthorAgeFilesLines
* Rename utils.py to strutils.pyZhongyue Luo2012-11-301-76/+0
| | | | | | Fixes bug #1083956 Change-Id: I681227e9428778adb7824a1930a33cfa5ffa13a1
* Move utils.execute to its own module.Michael Still2012-11-011-6/+0
| | | | | | | Also move the exceptions raised to being local to the executils module. Change-Id: Ibb2445f92840b9ce4b52373b0b09adb3d6a4a897
* Extracted parse_host_port into network_utils.Eugene Kirpichov2012-09-261-17/+0
| | | | Change-Id: I77bcbf03a18659cfa62e99da9ba2136f8348022b
* Use pep8 v1.3.3Zhongyue Luo2012-09-131-8/+8
| | | | | | | Fixed indents which violate pep8 1.3.3 Also added .mailmap file to coalesce commits Change-Id: Ia7a788a28e6c0fd9cb52fb7ea477cddd7d589e58
* Added a method for parsing host:port pairs.Eugene Kirpichov2012-09-111-0/+17
| | | | | | | | | | | | The method works correctly with ipv6. An alternative way would be to use urlparse, but urlparse only works correctly starting with Python 2.7, so to be compatible, we have to reimplement this part. The method will be used for parsing Glance API server addresses, RabbitMQ addresses and perhaps other things. Change-Id: Ie5014891c6abcd80681a370d5dd94cb0406f7f61
* Remove unused imports.Russell Bryant2012-05-141-2/+0
| | | | | | This patch removes a couple of unused impots from test_utils. Change-Id: I40a2f4086e33dbcdb2eceb699c82a1350665c181
* Change behavior in utils.import_object().Russell Bryant2012-04-111-19/+0
| | | | | | | | | | | | | | | | | | | Fix bug 972859. Prior to this patch, utils.import_object(foo) and utils.import_class(foo) would return the same thing if foo was the path to a class. This patch changes utils.import_object() to return an instance of the class, instead, also allowing you to pass in arguments to the constructor. This patch also removes the odd behavior of import_object() to be able to also import a module. Instead, a new function import_module() has been added. Finally, the three import helpers have been moved to a new module, importutils. Change-Id: Ia2ea64c965692f8c3a29adec332dd93a83980070
* Move auth_str_equal() to a new authutils module.Russell Bryant2012-04-111-6/+0
| | | | | | | This patch moves auth_str_utils() to a new module, authutils, for helper functions related to authentication. Change-Id: I83f174486269701deed3500f890832a71ff3e315
* Create openstack.common.timeutils.Russell Bryant2012-04-041-131/+0
| | | | | | | Split time related utility functions out of openstack.common.utils into a new module, timeutils. Change-Id: Ic09952cd48e0b4548e410926cc456cbd515a4e56
* Make 'yes' also a true booleanSean Dague2012-03-221-2/+11
| | | | | | | Adds yes, Yes, and all other capitalizations as a true boolean. Updated unit tests to test for these. Change-Id: I97915f870dd6bba612f74f0ceb78f2399fd81a93
* Add auth_str_equal() to common utils.Russell Bryant2012-03-191-0/+6
| | | | | | | | | | | This function provides a constant-time string comparison. Its primary use case is for authentication to avoid timing vulnerabilities. Similar functions currently exist in keystone, nova, and swift. The three diverged in slight ways immediately after going in. This version comes from keystone, which I consider the "best" version to promote to openstack-common. Change-Id: I39537a21be8a402e34e526466f6b90188344a35d
* Promote more complete support for ISO 8601 time.Eoghan Glynn2012-02-201-2/+110
| | | | | | | | | | | | | | | Support for ISO 861 time representation is now duplicated in nova: https://github.com/openstack/nova/commit/c30193fbf and in glance: https://github.com/openstack/glance/commit/f8f9f171 Note this patch introduces a new dependency on python-iso8601, which has already been packaged for Fedora, EPEL and Ubuntu/Debian. Change-Id: I87c32effa97d3b7a8d869522b62c0c6fb31bcef8
* Add git changelog method.Monty Taylor2012-02-091-7/+0
| | | | Change-Id: I71d99f00b2154bf151a1521016118ba6bd088f79
* Split functions to avoid eventlet import.Monty Taylor2012-02-061-1/+2
| | | | | | | | | | Some of these functions are used in setup.py. In a virtualenv based workflow, python setup.py sdist is called to create a tarball which is then installed into the virtualenv. These functions need to be in a separate file so that they can be imported by setup.py without eventlet needing to be installed. Change-Id: I6f7dc9614895b8c91135c62373b98afe55e1fc7d
* moar utils testsJason Kölker2011-12-021-0/+53
|
* add utils testJason Kölker2011-12-011-0/+70