netbox-secretstore
netbox-secretstore copied to clipboard
Fixes: #91 Force using FormParser for GetSessionKeyViewSet
Netbox started enforcing application/json for API request in https://github.com/netbox-community/netbox/commit/bfbf97aec9119539f7f42cf16f52d0ca8203ba60
Which broke get-session-key. Override this.
FAIL: test_get_session_key (netbox_secretstore.tests.test_api.GetSessionKeyTest)
...
â ââââââââââââââââââââââââââââââââââ locals ââââââââââââââââââââââââââââââââââ® â
â â err = { â â
â â â 'detail': 'Unsupported media type â â
â â "multipart/form-data; boundary=BoUnDaRyStRiNg; â â
â â charset=ut'+16 â â
â â } â â
â â err_message = "Expected HTTP status 200; received 415: {'detail': â â
â â ErrorDetail(string='Unsupport"+121 â â
â â expected_status = 200 â â
â â response = <Response status_code=415, "application/json"> â â
â â self = <netbox_secretstore.tests.test_api.GetSessionKeyTest â â
â â testMethod=test_get_session_key> â â
â â°ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ⯠â
If multipart/form-data should also be supported then MultiPartParser needs to be added also.