Skip to content

Commit 68f2a99

Browse files
Add a unit test to manager for storage username.
1 parent acde527 commit 68f2a99

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/managers/hardware_tests.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,13 @@ def test_authorize_storage(self):
845845
options = self.hardware.authorize_storage(1234, "SL01SEL301234-11")
846846

847847
self.assertEqual(True, options)
848+
849+
def test_authorize_storage_empty(self):
850+
mock = self.set_mock('SoftLayer_Account', 'getNetworkStorage')
851+
mock.return_value = []
852+
self.assertRaises(SoftLayer.exceptions.SoftLayerError,
853+
self.hardware.authorize_storage,
854+
1234, "#")
848855

849856

850857
class HardwareHelperTests(testing.TestCase):

0 commit comments

Comments
 (0)