@@ -374,9 +374,10 @@ def test_assemble_basic(
374
374
HTTP_AUTHORIZATION = f"Bearer { self .token .token } " ,
375
375
)
376
376
assert response .status_code == 200 , response .content
377
- assert response .data ["state" ] == ChunkFileState .OK
377
+ assert response .data ["state" ] == ChunkFileState .CREATED
378
378
assert set (response .data ["missingChunks" ]) == set ()
379
- assert response .data ["artifactId" ] == artifact_id
379
+ expected_url = f"/organizations/{ self .organization .slug } /preprod/internal/{ artifact_id } "
380
+ assert expected_url in response .data ["artifactUrl" ]
380
381
381
382
mock_create_preprod_artifact .assert_called_once_with (
382
383
org_id = self .organization .id ,
@@ -440,9 +441,10 @@ def test_assemble_with_metadata(
440
441
HTTP_AUTHORIZATION = f"Bearer { self .token .token } " ,
441
442
)
442
443
assert response .status_code == 200 , response .content
443
- assert response .data ["state" ] == ChunkFileState .OK
444
+ assert response .data ["state" ] == ChunkFileState .CREATED
444
445
assert set (response .data ["missingChunks" ]) == set ()
445
- assert response .data ["artifactId" ] == artifact_id
446
+ expected_url = f"/organizations/{ self .organization .slug } /preprod/internal/{ artifact_id } "
447
+ assert expected_url in response .data ["artifactUrl" ]
446
448
447
449
mock_create_preprod_artifact .assert_called_once_with (
448
450
org_id = self .organization .id ,
@@ -500,7 +502,7 @@ def test_assemble_with_missing_chunks(self) -> None:
500
502
)
501
503
502
504
assert response .status_code == 200 , response .content
503
- assert response .data ["state" ] == ChunkFileState .OK
505
+ assert response .data ["state" ] == ChunkFileState .CREATED
504
506
505
507
def test_assemble_response (self ) -> None :
506
508
content = b"test response content"
@@ -518,7 +520,7 @@ def test_assemble_response(self) -> None:
518
520
)
519
521
520
522
assert response .status_code == 200 , response .content
521
- assert response .data ["state" ] == ChunkFileState .OK
523
+ assert response .data ["state" ] == ChunkFileState .CREATED
522
524
523
525
def test_assemble_with_pending_deletion_project (self ) -> None :
524
526
self .project .status = ObjectStatus .PENDING_DELETION
@@ -637,7 +639,7 @@ def test_check_existing_assembly_status(self) -> None:
637
639
638
640
# Even if assembly status exists, endpoint doesn't check it
639
641
set_assemble_status (
640
- AssembleTask .PREPROD_ARTIFACT , self .project .id , checksum , ChunkFileState .OK
642
+ AssembleTask .PREPROD_ARTIFACT , self .project .id , checksum , ChunkFileState .CREATED
641
643
)
642
644
643
645
response = self .client .post (
@@ -671,7 +673,7 @@ def test_integration_task_sets_status_api_can_read_it(self) -> None:
671
673
672
674
# Even if task sets status, this endpoint doesn't read it
673
675
set_assemble_status (
674
- AssembleTask .PREPROD_ARTIFACT , self .project .id , total_checksum , ChunkFileState .OK
676
+ AssembleTask .PREPROD_ARTIFACT , self .project .id , total_checksum , ChunkFileState .CREATED
675
677
)
676
678
677
679
response = self .client .post (
0 commit comments