1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #4324: Add CSV import view for services

This commit is contained in:
Jeremy Stretch
2020-03-06 16:33:43 -05:00
parent 2a5bf2a222
commit 9fa5004a35
7 changed files with 53 additions and 4 deletions

View File

@@ -334,9 +334,6 @@ class VLANTestCase(ViewTestCases.PrimaryObjectViewTestCase):
class ServiceTestCase(ViewTestCases.PrimaryObjectViewTestCase):
model = Service
# Disable inapplicable tests
test_import_objects = None
# TODO: Resolve URL for Service creation
test_create_object = None
@@ -366,6 +363,13 @@ class ServiceTestCase(ViewTestCases.PrimaryObjectViewTestCase):
'tags': 'Alpha,Bravo,Charlie',
}
cls.csv_data = (
"device,name,protocol,port,description",
"Device 1,Service 1,TCP,1,First service",
"Device 1,Service 2,TCP,2,Second service",
"Device 1,Service 3,UDP,3,Third service",
)
cls.bulk_edit_data = {
'protocol': ServiceProtocolChoices.PROTOCOL_UDP,
'port': 888,