Skip to content

Commit aa4de89

Browse files
Fixed unit tests
1 parent 60c78b2 commit aa4de89

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

SoftLayer/CLI/order/item_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@click.argument('package_keyname')
1818
@click.option('--keyword', '-k', help="A word (or string) used to filter item names.")
1919
@click.option('--category', '-c', help="Category code to filter items by")
20-
@click.option('--prices', '-p', is_flag=True,
20+
@click.option('--prices', '-p', is_flag=True,
2121
help='Use --prices to list the server item prices, and to list the '
2222
'Item Prices by location, add it to the --prices option using '
2323
'location KeyName, e.g. --prices AMSTERDAM02')

tests/CLI/modules/order_tests.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ def test_item_list_prices(self):
5050

5151
self.assert_no_fail(result)
5252
output = json.loads(result.output)
53-
self.assertEqual(output[0][0]['priceId'], 1007)
53+
self.assertEqual(output[0][0]['Price Id'], 1007)
5454
self.assertEqual(output[0][1]['Restriction'], '- - - -')
55-
self.assertEqual(output[0][1]['keyName'], 'KeyName015')
55+
self.assertEqual(output[0][1]['KeyName'], 'KeyName015')
5656
self.assert_called_with('SoftLayer_Product_Package', 'getItems')
5757

5858
def test_item_list_location_keyname(self):
@@ -61,8 +61,8 @@ def test_item_list_location_keyname(self):
6161
self.assert_no_fail(result)
6262
output = json.loads(result.output)
6363
self.assertEqual(output[0][0]['Hourly'], 0.0)
64-
self.assertEqual(output[0][1]['keyName'], 'KeyName015')
65-
self.assertEqual(output[0][1]['priceId'], 1144)
64+
self.assertEqual(output[0][1]['KeyName'], 'KeyName015')
65+
self.assertEqual(output[0][1]['Price Id'], 1144)
6666
self.assert_called_with('SoftLayer_Product_Package', 'getItemPrices')
6767

6868
def test_item_list_location_name(self):
@@ -71,8 +71,8 @@ def test_item_list_location_name(self):
7171
self.assert_no_fail(result)
7272
output = json.loads(result.output)
7373
self.assertEqual(output[0][0]['Hourly'], 0.0)
74-
self.assertEqual(output[0][1]['keyName'], 'KeyName015')
75-
self.assertEqual(output[0][1]['priceId'], 1144)
74+
self.assertEqual(output[0][1]['KeyName'], 'KeyName015')
75+
self.assertEqual(output[0][1]['Price Id'], 1144)
7676
self.assert_called_with('SoftLayer_Product_Package', 'getItemPrices')
7777

7878
def test_item_list_category_keyword(self):
@@ -81,8 +81,8 @@ def test_item_list_category_keyword(self):
8181
self.assert_no_fail(result)
8282
output = json.loads(result.output)
8383
self.assertEqual(output[0][0]['Hourly'], 0.0)
84-
self.assertEqual(output[0][1]['keyName'], 'KeyName015')
85-
self.assertEqual(output[0][1]['priceId'], 1144)
84+
self.assertEqual(output[0][1]['KeyName'], 'KeyName015')
85+
self.assertEqual(output[0][1]['Price Id'], 1144)
8686
self.assert_called_with('SoftLayer_Product_Package', 'getItemPrices')
8787

8888
def test_package_list(self):

0 commit comments

Comments
 (0)