Skip to content

Commit 0721453

Browse files
Ramkishor ChaladiRamkishor Chaladi
authored andcommitted
added unit test cases
I have added four unit test cases to get code coverage of 100% for this file:SoftLayer/CLI/account/events.py of these functions: test_account_events(), test_account_planned_events(), test_account_unplanned_events(), test_account_announcement_events() in /softlayer-python/tests/CLI/modules/account_tests.py
1 parent fb14b43 commit 0721453

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/CLI/modules/account_tests.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,23 @@ def test_order_upgrade(self):
180180
result = self.run_command(['account', 'orders', '--upgrades'])
181181
self.assert_no_fail(result)
182182
self.assert_called_with('SoftLayer_Account', 'getUpgradeRequests')
183+
184+
def test_account_events(self):
185+
result = self.run_command(['account', 'events', '--date-min', '5/9/2023'])
186+
self.assert_no_fail(result)
187+
self.assert_called_with(self.SLNOE, 'getAllObjects')
188+
189+
def test_account_planned_events(self):
190+
result = self.run_command(['account', 'events', '--planned'])
191+
self.assert_no_fail(result)
192+
self.assert_called_with(self.SLNOE, 'getAllObjects')
193+
194+
def test_account_unplanned_events(self):
195+
result = self.run_command(['account', 'events', '--unplanned'])
196+
self.assert_no_fail(result)
197+
self.assert_called_with(self.SLNOE, 'getAllObjects')
198+
199+
def test_account_announcement_events(self):
200+
result = self.run_command(['account', 'events', '--announcement'])
201+
self.assert_no_fail(result)
202+
self.assert_called_with(self.SLNOE, 'getAllObjects')

0 commit comments

Comments
 (0)