@@ -13,27 +13,27 @@ def test_file_upload_list_empty_ids_returns_empty_for_non_draft_project(business
1313 """GET file-uploads with ids=[] and non-draft project returns empty list (reopened import modal)."""
1414 # Create project and ensure it is not draft
1515 r = business_client .post (
16- " /api/projects/" ,
17- data = json .dumps ({" title" : " Test" , " label_config" : " <View></View>" }),
18- content_type = " application/json" ,
16+ ' /api/projects/' ,
17+ data = json .dumps ({' title' : ' Test' , ' label_config' : ' <View></View>' }),
18+ content_type = ' application/json' ,
1919 )
2020 assert r .status_code == 201
21- project_id = r .json ()["id" ]
21+ project_id = r .json ()['id' ]
2222 project = Project .objects .get (id = project_id )
2323 project .is_draft = False
24- project .save (update_fields = [" is_draft" ])
24+ project .save (update_fields = [' is_draft' ])
2525
2626 # Create a file upload that would appear if we returned "all"
2727 FileUpload .objects .create (
2828 user = business_client .admin ,
2929 project = project ,
30- file = ContentFile (b"x" , name = " upload/test.txt" ),
30+ file = ContentFile (b'x' , name = ' upload/test.txt' ),
3131 )
3232
3333 # Request with explicit empty ids: must return empty list (no previously imported files)
3434 r = business_client .get (
35- f" /api/projects/{ project_id } /file-uploads" ,
36- data = {" ids" : "[]" },
35+ f' /api/projects/{ project_id } /file-uploads' ,
36+ data = {' ids' : '[]' },
3737 )
3838 assert r .status_code == 200
3939 assert r .json () == []
@@ -43,19 +43,19 @@ def test_file_upload_list_empty_ids_returns_empty_for_non_draft_project(business
4343def test_file_upload_list_get_sends_cache_control_no_store (business_client ):
4444 """GET file-uploads response includes Cache-Control: no-store so list is not cached."""
4545 r = business_client .post (
46- " /api/projects/" ,
47- data = json .dumps ({" title" : " Test" , " label_config" : " <View></View>" }),
48- content_type = " application/json" ,
46+ ' /api/projects/' ,
47+ data = json .dumps ({' title' : ' Test' , ' label_config' : ' <View></View>' }),
48+ content_type = ' application/json' ,
4949 )
5050 assert r .status_code == 201
51- project_id = r .json ()["id" ]
51+ project_id = r .json ()['id' ]
5252 project = Project .objects .get (id = project_id )
5353 project .is_draft = False
54- project .save (update_fields = [" is_draft" ])
54+ project .save (update_fields = [' is_draft' ])
5555
5656 r = business_client .get (
57- f" /api/projects/{ project_id } /file-uploads" ,
58- data = {" ids" : "[]" },
57+ f' /api/projects/{ project_id } /file-uploads' ,
58+ data = {' ids' : '[]' },
5959 )
6060 assert r .status_code == 200
61- assert r .get (" Cache-Control" ) == " no-store"
61+ assert r .get (' Cache-Control' ) == ' no-store'
0 commit comments