summaryrefslogtreecommitdiffstats
path: root/tests/unit/test_pastedeploy.py
Commit message (Collapse)AuthorAgeFilesLines
* Replace direct use of testtools BaseTestCase.Monty Taylor2013-01-241-2/+2
| | | | | | | | | 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
* Use testtools as test base class.Monty Taylor2013-01-241-11/+6
| | | | | | | | | | | | | 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
* Add generic PasteDeploy app and filter factoriesMark McLoughlin2012-03-261-0/+109
These generic factories allow us to dump copied and pasted app_factory and filter_factory methods. The main difference is the paste configuration changes from: [app:myapp] paste.app_factory = myapp:app_factory ... [filter:myfilter] paste.filter_factory = myapp:filter_factory to this: [app:myapp] paste.app_factory = openstack.common.pastedeploy:app_factory openstack.app_factory = myapp:App ... [filter:myfilter] paste.filter_factory = openstack.common.pastedeploy:filter_factory openstack.filter_factory = myapp:Filter Apart from reducing code duplication, this will also allow us to have the generic factories inject other data into the apps and filters. This could implemented as a new feature in PasteDeploy itself - e.g. allow the loadapp() caller supply a python object which is passed on to the factories. In the meantime, Glance has code like this to pass a ConfigOpts instance to factories. Keystone is moving a similar way, as will other projects as they move away from a global config object. Change-Id: I928d1f6da154f0f41edd624e25b8918a0e12cb28