feat: configure export year window and publish ZIP archives under 99 MB
All checks were successful
Mostovik Backend CI/CD / Tests and lint (push) Successful in 4m1s
Mostovik Backend CI/CD / Build linux/amd64 release images (push) Successful in 4m9s
Mostovik Backend CI/CD / Deploy and verify internal main (push) Has been skipped
Mostovik Backend CI/CD / Deploy dev (push) Successful in 3m5s
All checks were successful
Mostovik Backend CI/CD / Tests and lint (push) Successful in 4m1s
Mostovik Backend CI/CD / Build linux/amd64 release images (push) Successful in 4m9s
Mostovik Backend CI/CD / Deploy and verify internal main (push) Has been skipped
Mostovik Backend CI/CD / Deploy dev (push) Successful in 3m5s
This commit is contained in:
@@ -17,12 +17,13 @@ from rest_framework.test import APIClient
|
||||
from tests.apps.user.factories import UserFactory
|
||||
|
||||
|
||||
@pytest.mark.parametrize("selection_kind", ["file", "source_archive"])
|
||||
@pytest.mark.django_db(transaction=True)
|
||||
@pytest.mark.skipif(
|
||||
connection.vendor != "postgresql",
|
||||
reason="Requires PostgreSQL row locks and independent connections",
|
||||
)
|
||||
def test_two_simultaneous_native_posts_one_ticket(tmp_path):
|
||||
def test_two_simultaneous_native_posts_one_ticket(tmp_path, selection_kind):
|
||||
with override_settings(SOURCE_EXPORT_DIRECTORY=str(tmp_path)):
|
||||
user = UserFactory.create_superuser()
|
||||
organization = Organization.objects.create(
|
||||
@@ -41,10 +42,20 @@ def test_two_simultaneous_native_posts_one_ticket(tmp_path):
|
||||
ticket = issue_ticket(
|
||||
user,
|
||||
{
|
||||
"selection_kind": "file",
|
||||
"selection_kind": selection_kind,
|
||||
"source_group": "government_procurements",
|
||||
"generation_id": str(generation.pk),
|
||||
"part_id": generation.manifest["parts"][0]["part_id"],
|
||||
**(
|
||||
{"part_id": generation.manifest["parts"][0]["part_id"]}
|
||||
if selection_kind == "file"
|
||||
else {
|
||||
"archive_id": next(
|
||||
a["archive_id"]
|
||||
for a in generation.manifest["archives"]
|
||||
if a["format"] == "json"
|
||||
)
|
||||
}
|
||||
),
|
||||
"format": "json",
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user