summaryrefslogtreecommitdiffstats
path: root/tests/utils.py
Commit message (Collapse)AuthorAgeFilesLines
* Allow BaseTestCase use a different conf objectMark McLoughlin2013-06-251-6/+5
| | | | | | | | | | | | | | | | The new messaging work will register options like rpc_backend and, since the existing RPC API registers those options with CONF, we need to run the messaging tests with a different ConfigOpts object. It's actually probably pretty sane for all unit tests to use a per-test ConfigOpts object rather than cfg.CONF anyway. The kombu and zmq tests have an issue with this where they rely on being able to call self.config() before the base class setUp() is called. Fixing this properly is a little tricky, so for now, initialize self.conf early to cfg.CONF just for these tests. Change-Id: I7b2e3db7c21c511f3ab16ac866e0cc80846cbd80
* Enable hacking H404 test.Dina Belova2013-06-111-2/+1
| | | | | | H404 - multi line docstring should start with a summary. Change-Id: I2099e1ee81ff9657f7a07401b8e8f3327d03bdbd
* Merge "Use mox object from moxstubout fixture"Jenkins2013-05-311-1/+3
|\
| * Use mox object from moxstubout fixtureMark McLoughlin2013-05-201-1/+3
| | | | | | | | | | | | | | | | | | | | The moxstubout fixture creates a mox object which we can re-use in tests. It also ensures verify() is called, which it clearly wasn't in the case of the qpid tests. Change-Id: Ibf3326f18b160865012d40a5841b65438262c4df
* | Specify database group instead of DEFAULTDavanum Srinivas2013-05-201-0/+20
|/ | | | | | | | | | | | At the request of Quantum folks, Let us switch from DEFAULT to database for the database related options. This will help with migration etc. DocImpact Fixes LP# 1171837 Change-Id: If602a6a7cc0f2a202632dd14574fea60dce4b589
* Fixes import order nitsZhongyue Luo2013-05-151-1/+1
| | | | Change-Id: I4fdc8eed74dd90d6450864daba7492d5e7266448
* Removes unused imports in the tests moduleZhongyue Luo2013-03-201-2/+0
| | | | | | Fixes bug #1157596 Change-Id: I36d5484eaa2f0e21188eed6e70cc1ad785233d6a
* update OpenStack, LLC to OpenStack FoundationMark McClain2013-03-131-1/+1
| | | | | | | | | | fixes bug 1154745 The previous update (https://review.openstack.org/#/c/24103/) missed header files that contained "OpenStack, LLC". This change corrects the missed files to reflect the OpenStack Foundation. Change-Id: I9c6de265267485ef2c82ea7e6d8643e82134d102
* Use oslo-config-2013.1b3Mark McLoughlin2013-02-171-1/+1
| | | | | | | | | | | | | | | The cfg API is now available via the oslo-config library, so switch to it and remove the copied-and-pasted version. Add the 2013.1b3 tarball to tools/pip-requires - this will be changed to 'oslo-config>=2013.1' when oslo-config is published to pypi. This will happen in time for grizzly final. Remove the 'deps = pep8==1.3.3' and 'deps = pyflakes' from tox.ini as it means all the other deps get installed with easy_install which can't install oslo-config from the URL. Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
* Add _FATAL_EXCEPTION_FORMAT_ERRORS global.Dan Prince2013-01-301-0/+8
| | | | | | | | | | | | | | Add a new global variable to control when exception format errors are fatal. Also, updates the Oslo test base class to enable fatal exception format errors. The motivation for this change is to give projects that use openstack common a hook to enable exception format checking when testing. Change-Id: Id8f4a0946b1614c8e987976b79069532a2e8608f
* Prevent parallel test port clashes for zmq.Monty Taylor2013-01-241-0/+1
| | | | | | | | | The scheme of incrementing port numbers did not work so well for parallel test runs. Part of blueprint grizzly-testtools. Change-Id: I100e79ae79e4409691145dc721139d1a86839199
* Replace direct use of testtools BaseTestCase.Monty Taylor2013-01-241-0/+3
| | | | | | | | | Using the BaseTestCase across the tests in the tree lets us put in log fixtures and consistently handle mox and stubout. Part of blueprint grizzly-testtools. Change-Id: Iba7eb2c63b0c514009b2c28e5930b27726a147b0
* Fix up test_qpid to use BaseTestCase.Monty Taylor2013-01-241-1/+0
| | | | | | | | While we're in there, simplify its use of fixtures. Part of blueprint grizzly-testtools. Change-Id: I7ef05cc9c191aab1959a31770f905f34447e64ea
* Use testtools as test base class.Monty Taylor2013-01-241-9/+5
| | | | | | | | | | | | | On the path to testr migration, we need to replace the unittest base classes with testtools. Replace tearDown with addCleanup, addCleanup is more resilient than tearDown. The fixtures library has excellent support for managing and cleaning tempfiles. Use it. Replace skip_ with testtools.skipTest Part of blueprint grizzly-testtools. Change-Id: I45e11bbb1ff9b31f3278d3b016737dcb7850cd98
* Added a base class for unit tests.Andrew Bogott2012-06-201-0/+56
This provides some basic cfg and subout infrastructure for tests. It's similar to the test base used in other OpenStack projects, so having it here should make migrating tests to common somewhat easier. Change-Id: I90775bf99313e7dd16929059132ee058287b3585