I am having trouble performing a test list which contains "upload" type tests in a specific way through the API.
My intended use case is a script that can selectively complete part of an in-progress test list, using HTTP PATCH requests. This would add data to a single in-progress test list instance. The test list has multiple "upload" type tests, but I would like to be able to add data to a subset of the tests, which may or may not include one of the upload tests. Using PATCH to modify a subset of tests works fine when there is not an "upload" test in the test list.
I appreciate this isn't really a documented feature, but has anyone else had experience with this or anything similar? I think there could possibly be a more general problem with skipping "upload" tests (
API trouble in QATrack), rather than anything specific to what I'm doing?
- I tried omitting the upload test (when updating other tests) and got a 500 error, with "AttributeError: 'NoneType' object has no attribute 'attachment'" in debug.log
- I tried requesting and reusing the existing values, which resulted in a 400 error ("[test] is missing the filename field")
- I tried skipping the upload test, which resulted in a 400 error ("[test] is missing the filename field")
- I tried setting value:None and filename:None, which resulted in a 400 error ("non_field_errors":["base64 encoding requested but content does not appear to be base64"])
- I also tried as above with "encoding": "text" and got a 500 error, with "TypeError: object of type 'NoneType' has no len()" in debug.log
If this proves impossible, I will just separate the main test list into multiple separate test lists, each with a single upload test so that I never need to skip it, but wanted to make sure I'd ruled out all possibilities first.
Thanks,
Ben