Use FakeFlavor in TestFlavorUnset.
Change-Id: Ifbd360db39d380efd9632300367b13283ac75f54 Implements: blueprint improve-flavor-unit-test
This commit is contained in:
parent
dfbf41c55f
commit
db516b2c96
@ -13,8 +13,6 @@
|
||||
# under the License.
|
||||
#
|
||||
|
||||
import copy
|
||||
|
||||
from openstackclient.compute.v2 import flavor
|
||||
from openstackclient.tests.compute.v2 import fakes as compute_fakes
|
||||
|
||||
@ -242,14 +240,13 @@ class TestFlavorSet(TestFlavor):
|
||||
|
||||
class TestFlavorUnset(TestFlavor):
|
||||
|
||||
# Return value of self.flavors_mock.find().
|
||||
flavor = compute_fakes.FakeFlavor.create_one_flavor()
|
||||
|
||||
def setUp(self):
|
||||
super(TestFlavorUnset, self).setUp()
|
||||
|
||||
self.flavors_mock.find.return_value = compute_fakes.FakeFlavorResource(
|
||||
None,
|
||||
copy.deepcopy(compute_fakes.FLAVOR),
|
||||
loaded=True,
|
||||
)
|
||||
self.flavors_mock.find.return_value = self.flavor
|
||||
|
||||
self.cmd = flavor.UnsetFlavor(self.app, None)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user