@@ -456,21 +456,21 @@ def test_download_project(
456456 assert resp .status_code == 200
457457
458458
459- def test_large_project_download_fail (client , diff_project ):
460- """Test downloading too large project is refused"""
461- resp = client .get (
459+ def test_prepare_large_project_fail (client , diff_project ):
460+ """Test asking for too large project is refused"""
461+ resp = client .post (
462462 url_for (
463- "/app.mergin_sync_private_api_controller_download_project " ,
463+ "/app.mergin_sync_private_api_controller_prepare_archive " ,
464464 id = diff_project .id ,
465465 version = "v1" ,
466466 )
467467 )
468- assert resp .status_code == 202
468+ assert resp .status_code == 201
469469 # pretend testing project to be too large by lowering limit
470470 client .application .config ["MAX_DOWNLOAD_ARCHIVE_SIZE" ] = 10
471- resp = client .get (
471+ resp = client .post (
472472 url_for (
473- "/app.mergin_sync_private_api_controller_download_project " ,
473+ "/app.mergin_sync_private_api_controller_prepare_archive " ,
474474 id = diff_project .id ,
475475 version = "v1" ,
476476 )
@@ -480,17 +480,17 @@ def test_large_project_download_fail(client, diff_project):
480480
481481test_prepare_proj_data = [
482482 # zips do not exist, version not specified -> trigger celery to create zip with latest version
483- (0 , 0 , 0 , None , 202 , 1 ),
483+ (0 , 0 , 0 , None , 201 , 1 ),
484484 # expired partial zip exists -> call celery task
485- (0 , 1 , 1 , None , 202 , 1 ),
485+ (0 , 1 , 1 , None , 201 , 1 ),
486486 # valid partial zip exists -> do not call celery
487- (0 , 1 , 0 , None , 202 , 0 ),
487+ (0 , 1 , 0 , None , 204 , 0 ),
488488 # zips do not exist, version specified -> call celery task with specified version
489- (0 , 0 , 0 , "v1" , 202 , 1 ),
489+ (0 , 0 , 0 , "v1" , 201 , 1 ),
490490 # specified version does not exist -> 404
491491 (0 , 0 , 0 , "v100" , 404 , 0 ),
492492 # zip is already prepared to download -> do not call celery
493- (1 , 0 , 0 , None , 200 , 0 ),
493+ (1 , 0 , 0 , None , 204 , 0 ),
494494]
495495
496496
0 commit comments