KombuStubs fixture in test_kombu is misleading and ugly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo-incubator |
Fix Released
|
Low
|
Roman Podoliaka |
Bug Description
Currently, KombuStubs is defined this way:
class KombuStubs:
@staticmethod
def setUp(self):
if kombu:
else:
@staticmethod and usage of self variable is misleading and ugly. The original intention was to use this class as a fixture in various test cases. The problem is that this fixture requires a way to override config options for a test, which is done by config() method of test case instances. In order to use it, KombuStubs must have a reference to a test case instance.
We'd better pass this reference to KombuStubs __init__() method, rather than use a static method.
Changed in oslo: | |
importance: | Undecided → Low |
Changed in oslo: | |
milestone: | none → havana-2 |
status: | Fix Committed → Fix Released |
Changed in oslo: | |
milestone: | havana-2 → 2013.2 |
Fix proposed to branch: master /review. openstack. org/33804
Review: https:/