Skip to content

Commit 2274cf0

Browse files
author
Fernando Ojeda
committed
Add unit test for ordering manager.
1 parent 6025c3e commit 2274cf0

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

tests/managers/ordering_tests.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ def test_clean_quote_verify(self):
711711
self.assertNotIn('testProperty', order_container)
712712
self.assertNotIn('reservedCapacityId', order_container)
713713

714-
def test_get_item_capacity(self):
714+
def test_get_item_capacity_core(self):
715715

716716
items = [{
717717
"capacity": "1",
@@ -727,3 +727,20 @@ def test_get_item_capacity(self):
727727
item_capacity = self.ordering.get_item_capacity(items, ['GUEST_CORE_1_DEDICATED', 'OS_RHEL_7_X_LAMP_64_BIT'])
728728

729729
self.assertEqual(1, int(item_capacity))
730+
731+
def test_get_item_capacity_storage(self):
732+
733+
items = [{
734+
"capacity": "1",
735+
"id": 6131,
736+
"keyName": "STORAGE_SPACE_FOR_2_IOPS_PER_GB",
737+
},
738+
{
739+
"capacity": "1",
740+
"id": 10201,
741+
"keyName": "READHEAVY_TIER",
742+
}]
743+
744+
item_capacity = self.ordering.get_item_capacity(items, ['READHEAVY_TIER', 'STORAGE_SPACE_FOR_2_IOPS_PER_GB'])
745+
746+
self.assertEqual(1, int(item_capacity))

0 commit comments

Comments
 (0)