Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Commit d5ad2b5

Browse files
author
Aaron Welch
committed
fix tests
1 parent b120836 commit d5ad2b5

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

packet/Manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def validate_capacity(self, servers):
161161
try:
162162
self.call_api('/capacity', 'POST', params)
163163
return True
164-
except PacketError as e: # pragma: no cover
164+
except PacketError as e: # pragma: no cover
165165
if e.args[0] == 'Error 503: Service Unavailable':
166166
return False
167167
else:

packet/baseapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import requests
55

66

7-
class Error(Exception): # pragma: no cover
7+
class Error(Exception): # pragma: no cover
88
"""Base exception class for this module"""
99
def __init__(self, msg, cause=None):
1010
super(Error, self).__init__(msg)

test/test_packet.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ def test_create_device(self):
7373
self.assertIsInstance(device, packet.Device)
7474

7575
def test_create_device_ipxe(self):
76-
device = self.manager.create_device('438659f0', 'hostname', 'baremetal_0', 'ewr1', 'custom_ipxe', ipxe_script_url='https://example.com', always_pxe=True)
76+
device = self.manager.create_device('438659f0', 'hostname', 'baremetal_0', 'ewr1', 'custom_ipxe',
77+
ipxe_script_url='https://example.com', always_pxe=True)
7778
self.assertIsInstance(device, packet.Device)
7879

7980
def test_get_device(self):
@@ -182,10 +183,11 @@ def test_volume_create_clone(self):
182183
volume.create_clone()
183184

184185
def test_capacity(self):
185-
capacity = self.manager.get_capacity()
186+
self.manager.get_capacity()
186187

187188
def test_validate_capacity(self):
188189
capacity = self.manager.validate_capacity([('ewr1', 'baremetal_0', 10)])
190+
self.assertTrue(capacity)
189191

190192

191193
class PacketMockManager(packet.Manager):

0 commit comments

Comments
 (0)