fix: accept roskosmos corporation scope alias
All checks were successful
CI/CD Pipeline / Code Quality Checks (push) Successful in 2m22s
CI/CD Pipeline / Run Tests (push) Successful in 2m28s
CI/CD Pipeline / Build Docker Images (push) Successful in 2m24s
CI/CD Pipeline / Push to Gitea Registry (push) Successful in 1s
CI/CD Pipeline / Deploy to Server (push) Successful in 1s
All checks were successful
CI/CD Pipeline / Code Quality Checks (push) Successful in 2m22s
CI/CD Pipeline / Run Tests (push) Successful in 2m28s
CI/CD Pipeline / Build Docker Images (push) Successful in 2m24s
CI/CD Pipeline / Push to Gitea Registry (push) Successful in 1s
CI/CD Pipeline / Deploy to Server (push) Successful in 1s
This commit is contained in:
@@ -193,6 +193,18 @@ class OrganizationApiTest(APITestCase):
|
||||
self.assertEqual(len(response.data["results"]), 1)
|
||||
self.assertEqual(response.data["results"][0]["id"], str(rosatom_org.id))
|
||||
|
||||
for scope_code in ("roscosmos", "roskosmos"):
|
||||
response = self.client.get(
|
||||
f"/api/v1/organizations/?corporation_scope={scope_code}"
|
||||
)
|
||||
|
||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||
self.assertEqual(len(response.data["results"]), 1)
|
||||
self.assertEqual(response.data["results"][0]["id"], str(roscosmos_org.id))
|
||||
self.assertEqual(
|
||||
response.data["results"][0]["corporation_scope"], "roscosmos"
|
||||
)
|
||||
|
||||
def test_registry_category_filters_support_snake_and_camel_case(self):
|
||||
opk_org = OrganizationFactory.create(name="АО ОПК")
|
||||
goz_org = OrganizationFactory.create(name="АО ГОЗ", in_275_fz_registry=True)
|
||||
|
||||
Reference in New Issue
Block a user