File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
openwisp_controller/config/tests Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -2281,18 +2281,19 @@ def test_templates_fetch_queries_10(self):
22812281
22822282 def test_empty_device_form_with_config_inline (self ):
22832283 """
2284- Test for issue #1057: MultiValueDictKeyError when submitting
2285- empty device form with configuration inline added
2284+ Ensures submitting device form with missing required fields
2285+ and configuration inline shows validation errors instead of
2286+ raising an exception
22862287 """
22872288 org = self ._get_org ()
2289+ template = self ._create_template (organization = org )
22882290 path = reverse (f"admin:{ self .app_label } _device_add" )
2289- # Submit empty form with config inline
2291+ # Submit form without required device fields but with config inline
2292+ # This reproduces the scenario where user clicks "Add another Configuration"
2293+ # and submits without filling device details
22902294 params = {
2291- "name" : "" ,
2292- "mac_address" : "" ,
2293- "organization" : "" ,
22942295 "config-0-backend" : "netjsonconfig.OpenWrt" ,
2295- "config-0-templates" : "" ,
2296+ "config-0-templates" : str ( template . pk ) ,
22962297 "config-0-config" : json .dumps ({}),
22972298 "config-0-context" : "" ,
22982299 "config-TOTAL_FORMS" : 1 ,
You can’t perform that action at this time.
0 commit comments