@@ -110,8 +110,8 @@ def test_streaming_response_create(self, client: Runloop) -> None:
110110
111111 @parametrize
112112 def test_create_rejects_large_file_mount (self , client : Runloop ) -> None :
113- # 512KB + 1 byte
114- too_large_content = "a" * (512 * 1024 + 1 )
113+ # 786,000 bytes + 1 byte
114+ too_large_content = "a" * (786_000 + 1 )
115115 with pytest .raises (ValueError , match = r"over the limit" ):
116116 client .blueprints .create (
117117 name = "name" ,
@@ -120,19 +120,14 @@ def test_create_rejects_large_file_mount(self, client: Runloop) -> None:
120120
121121 @parametrize
122122 def test_create_rejects_total_file_mount_size (self , client : Runloop ) -> None :
123- # Two files at exactly per-file max, plus 1 extra byte across a third file to exceed 1MB total
124- per_file_max = 512 * 1024
125- content_a = "a" * per_file_max
126- content_b = "b" * per_file_max
127- content_c = "c" * 1
123+ # Ten files at exactly per-file max, plus 1 extra byte to exceed total limit
124+ per_file_max = 786_000
125+ file_mounts = {f"/tmp/{ i } .txt" : "a" * per_file_max for i in range (10 )}
126+ file_mounts ["/tmp/extra.txt" ] = "x"
128127 with pytest .raises (ValueError , match = r"total file_mounts size .* over the limit" ):
129128 client .blueprints .create (
130129 name = "name" ,
131- file_mounts = {
132- "/tmp/a.txt" : content_a ,
133- "/tmp/b.txt" : content_b ,
134- "/tmp/c.txt" : content_c ,
135- },
130+ file_mounts = file_mounts ,
136131 )
137132
138133 @parametrize
@@ -565,8 +560,8 @@ async def test_streaming_response_create(self, async_client: AsyncRunloop) -> No
565560
566561 @parametrize
567562 async def test_create_rejects_large_file_mount (self , async_client : AsyncRunloop ) -> None :
568- # 512KB + 1 byte
569- too_large_content = "a" * (512 * 1024 + 1 )
563+ # 786,000 bytes + 1 byte
564+ too_large_content = "a" * (786_000 + 1 )
570565 with pytest .raises (ValueError , match = r"over the limit" ):
571566 await async_client .blueprints .create (
572567 name = "name" ,
@@ -575,19 +570,14 @@ async def test_create_rejects_large_file_mount(self, async_client: AsyncRunloop)
575570
576571 @parametrize
577572 async def test_create_rejects_total_file_mount_size (self , async_client : AsyncRunloop ) -> None :
578- # Two files at exactly per-file max, plus 1 extra byte across a third file to exceed 1MB total
579- per_file_max = 512 * 1024
580- content_a = "a" * per_file_max
581- content_b = "b" * per_file_max
582- content_c = "c" * 1
573+ # Ten files at exactly per-file max, plus 1 extra byte to exceed total limit
574+ per_file_max = 786_000
575+ file_mounts = {f"/tmp/{ i } .txt" : "a" * per_file_max for i in range (10 )}
576+ file_mounts ["/tmp/extra.txt" ] = "x"
583577 with pytest .raises (ValueError , match = r"total file_mounts size .* over the limit" ):
584578 await async_client .blueprints .create (
585579 name = "name" ,
586- file_mounts = {
587- "/tmp/a.txt" : content_a ,
588- "/tmp/b.txt" : content_b ,
589- "/tmp/c.txt" : content_c ,
590- },
580+ file_mounts = file_mounts ,
591581 )
592582
593583 @parametrize
0 commit comments