@@ -90,7 +90,7 @@ def test_device_import_export_buttons(self):
9090
9191 def test_device_export (self ):
9292 response = self .client .post (
93- reverse (f'admin:{ self .app_label } _device_export' ), {'file_format ' : '0' }
93+ reverse (f'admin:{ self .app_label } _device_export' ), {'format ' : '0' }
9494 )
9595 self .assertNotContains (response , 'error' )
9696 self .assertIsNotNone (response .get ('Content-Disposition' ))
@@ -108,7 +108,7 @@ def test_device_import(self):
108108 csv = ContentFile (contents )
109109 response = self .client .post (
110110 reverse (f'admin:{ self .app_label } _device_import' ),
111- {'input_format ' : '0' , 'import_file' : csv },
111+ {'format ' : '0' , 'import_file' : csv },
112112 )
113113 self .assertNotContains (response , 'errorlist' )
114114 self .assertNotContains (response , 'Errors' )
@@ -132,7 +132,7 @@ def test_device_import_empty_config(self):
132132 csv = ContentFile (contents )
133133 response = self .client .post (
134134 reverse (f'admin:{ self .app_label } _device_import' ),
135- {'input_format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
135+ {'format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
136136 )
137137 self .assertFalse (response .context ['result' ].has_errors ())
138138 self .assertIn ('confirm_form' , response .context )
@@ -173,7 +173,7 @@ def test_device_import_missing_config(self):
173173 csv = ContentFile (contents )
174174 response = self .client .post (
175175 reverse (f'admin:{ self .app_label } _device_import' ),
176- {'input_format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
176+ {'format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
177177 )
178178 self .assertFalse (response .context ['result' ].has_errors ())
179179 self .assertIn ('confirm_form' , response .context )
@@ -212,7 +212,7 @@ def test_device_import_config_not_templates(self):
212212 csv = ContentFile (contents )
213213 response = self .client .post (
214214 reverse (f'admin:{ self .app_label } _device_import' ),
215- {'input_format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
215+ {'format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
216216 )
217217 self .assertFalse (response .context ['result' ].has_errors ())
218218 self .assertIn ('confirm_form' , response .context )
@@ -636,7 +636,7 @@ def test_device_import_with_group_apply_templates(self):
636636 csv = ContentFile (contents )
637637 response = self .client .post (
638638 reverse (f'admin:{ self .app_label } _device_import' ),
639- {'input_format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
639+ {'format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
640640 )
641641 self .assertFalse (response .context ['result' ].has_errors ())
642642 self .assertIn ('confirm_form' , response .context )
@@ -682,7 +682,7 @@ def test_device_import_templates_and_config(self):
682682 csv = ContentFile (contents )
683683 response = self .client .post (
684684 reverse (f'admin:{ self .app_label } _device_import' ),
685- {'input_format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
685+ {'format ' : '0' , 'import_file' : csv , 'file_name' : 'test.csv' },
686686 )
687687 self .assertFalse (response .context ['result' ].has_errors ())
688688 self .assertIn ('confirm_form' , response .context )
0 commit comments