feat(api): add media news sorting
All checks were successful
All checks were successful
This commit is contained in:
@@ -207,6 +207,21 @@ 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_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 (
|
||||
"payload__sentiment",
|
||||
"-payload__sentiment",
|
||||
"payload__news_source",
|
||||
"-payload__news_source",
|
||||
):
|
||||
self.assertIn(ordering_value, source_record_ordering_values)
|
||||
|
||||
def test_retrieve_returns_item_by_uid(self):
|
||||
organization = create_frontend_organization(
|
||||
|
||||
Reference in New Issue
Block a user