Skip to content

Commit

Permalink
fix broken bulkimport test
Browse files Browse the repository at this point in the history
reveleaed by non-iterable exceptions under Python 3
  • Loading branch information
lunkwill42 committed Oct 25, 2017
1 parent 05681cf commit 968291d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/integration/bulkimport_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,14 @@ def test_duplicate_locations_should_give_error(self):
self.assertTrue(isinstance(objects, AlreadyExists))

def test_created_objects_can_be_saved(self):
data = 'myroom:10.0.90.10:myorg:SRV::::fileserver::WEB:UNIX:MAIL'
data = 'myroom:10.0.90.10:myorg:SRV:::::fileserver::WEB:UNIX:MAIL'
parser = NetboxBulkParser(data)
importer = NetboxImporter(parser)
_line_num, objects = importer.next()

self.assertNotIsInstance(objects, Exception,
msg='Got exception instead of object list')

for obj in objects:
reset_object_foreignkeys(obj)
print(repr(obj))
Expand Down

0 comments on commit 968291d

Please sign in to comment.