@@ -83,7 +83,7 @@ def test_device_import_export_buttons(self):
83
83
84
84
def test_device_export (self ):
85
85
response = self .client .post (
86
- reverse (f'admin:{ self .app_label } _device_export' ), {'file_format ' : '0' }
86
+ reverse (f'admin:{ self .app_label } _device_export' ), {'format ' : '0' }
87
87
)
88
88
self .assertNotContains (response , 'error' )
89
89
self .assertIsNotNone (response .get ('Content-Disposition' ))
@@ -101,7 +101,7 @@ def test_device_import(self):
101
101
csv = ContentFile (contents )
102
102
response = self .client .post (
103
103
reverse (f'admin:{ self .app_label } _device_import' ),
104
- {'input_format ' : '0' , 'import_file' : csv },
104
+ {'format ' : '0' , 'import_file' : csv },
105
105
)
106
106
self .assertNotContains (response , 'errorlist' )
107
107
self .assertNotContains (response , 'Errors' )
@@ -125,7 +125,7 @@ def test_device_import_empty_config(self):
125
125
csv = ContentFile (contents )
126
126
response = self .client .post (
127
127
reverse (f'admin:{ self .app_label } _device_import' ),
128
- {'input_format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
128
+ {'format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
129
129
)
130
130
self .assertFalse (response .context ['result' ].has_errors ())
131
131
self .assertIn ('confirm_form' , response .context )
@@ -166,7 +166,7 @@ def test_device_import_missing_config(self):
166
166
csv = ContentFile (contents )
167
167
response = self .client .post (
168
168
reverse (f'admin:{ self .app_label } _device_import' ),
169
- {'input_format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
169
+ {'format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
170
170
)
171
171
self .assertFalse (response .context ['result' ].has_errors ())
172
172
self .assertIn ('confirm_form' , response .context )
@@ -205,7 +205,7 @@ def test_device_import_config_not_templates(self):
205
205
csv = ContentFile (contents )
206
206
response = self .client .post (
207
207
reverse (f'admin:{ self .app_label } _device_import' ),
208
- {'input_format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
208
+ {'format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
209
209
)
210
210
self .assertFalse (response .context ['result' ].has_errors ())
211
211
self .assertIn ('confirm_form' , response .context )
@@ -629,7 +629,7 @@ def test_device_import_with_group_apply_templates(self):
629
629
csv = ContentFile (contents )
630
630
response = self .client .post (
631
631
reverse (f'admin:{ self .app_label } _device_import' ),
632
- {'input_format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
632
+ {'format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
633
633
)
634
634
self .assertFalse (response .context ['result' ].has_errors ())
635
635
self .assertIn ('confirm_form' , response .context )
@@ -675,7 +675,7 @@ def test_device_import_templates_and_config(self):
675
675
csv = ContentFile (contents )
676
676
response = self .client .post (
677
677
reverse (f'admin:{ self .app_label } _device_import' ),
678
- {'input_format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
678
+ {'format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
679
679
)
680
680
self .assertFalse (response .context ['result' ].has_errors ())
681
681
self .assertIn ('confirm_form' , response .context )
0 commit comments