feat(registries): add SME and budget imports and fix source API workflows
All checks were successful
Mostovik Backend CI/CD / Tests and lint (push) Successful in 9m37s
Mostovik Backend CI/CD / Build linux/amd64 release images (push) Successful in 4m18s
Mostovik Backend CI/CD / Deploy and verify internal main (push) Has been skipped
Mostovik Backend CI/CD / Deploy customer main (push) Has been skipped
Mostovik Backend CI/CD / Deploy dev (push) Successful in 1m48s
All checks were successful
Mostovik Backend CI/CD / Tests and lint (push) Successful in 9m37s
Mostovik Backend CI/CD / Build linux/amd64 release images (push) Successful in 4m18s
Mostovik Backend CI/CD / Deploy and verify internal main (push) Has been skipped
Mostovik Backend CI/CD / Deploy customer main (push) Has been skipped
Mostovik Backend CI/CD / Deploy dev (push) Successful in 1m48s
This commit is contained in:
@@ -207,21 +207,28 @@ class OrganizationsApiV2Test(APITestCase):
|
||||
)
|
||||
self.assertIn("/api/v2/organizations/{uid}/sources/", paths)
|
||||
self.assertIn("/api/v2/organization-sources/{uid}/records/", paths)
|
||||
source_record_list_operation = paths[
|
||||
"/api/v2/organization-source-records/"
|
||||
]["get"]
|
||||
source_record_list_operation = paths["/api/v2/organization-source-records/"][
|
||||
"get"
|
||||
]
|
||||
source_record_parameters = {
|
||||
parameter["name"]: parameter
|
||||
for parameter in source_record_list_operation["parameters"]
|
||||
}
|
||||
source_record_ordering_values = source_record_parameters["ordering"]["enum"]
|
||||
for ordering_value in (
|
||||
source_record_ordering = source_record_parameters["ordering"]
|
||||
self.assertEqual(source_record_ordering["type"], "string")
|
||||
self.assertNotIn("enum", source_record_ordering)
|
||||
ordering_description = source_record_ordering["description"]
|
||||
for ordering_field in (
|
||||
"record_date",
|
||||
"external_id",
|
||||
"organization__name",
|
||||
"payload__sentiment",
|
||||
"-payload__sentiment",
|
||||
"payload__news_source",
|
||||
"-payload__news_source",
|
||||
):
|
||||
self.assertIn(ordering_value, source_record_ordering_values)
|
||||
self.assertIn(ordering_field, ordering_description)
|
||||
self.assertIn("префикс -", ordering_description)
|
||||
self.assertIn("через запятую без пробелов", ordering_description)
|
||||
self.assertIn("-record_date,-external_id", ordering_description)
|
||||
|
||||
def test_retrieve_returns_item_by_uid(self):
|
||||
organization = create_frontend_organization(
|
||||
@@ -425,7 +432,9 @@ class OrganizationsApiV2Test(APITestCase):
|
||||
|
||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||
self.assertNotIn("data", response.data)
|
||||
self.assertEqual(response.data["sources"][0]["source_group"], "financial_indicators")
|
||||
self.assertEqual(
|
||||
response.data["sources"][0]["source_group"], "financial_indicators"
|
||||
)
|
||||
|
||||
def test_source_group_filter_limits_organizations_by_source_extension(self):
|
||||
organization = create_frontend_organization(
|
||||
|
||||
Reference in New Issue
Block a user