feat: address QA analytics and report upload feedback
All checks were successful
All checks were successful
This commit is contained in:
@@ -43,6 +43,25 @@ class OrganizationApiTest(APITestCase):
|
||||
self.assertEqual(response.data["results"][0]["registry_category_label"], "ОПК")
|
||||
self.assertEqual(response.data["results"][0]["short_name"], "АО «Альфа»")
|
||||
|
||||
def test_catalog_hides_form_only_organization_until_mostovik_confirms_it(self):
|
||||
organization = OrganizationFactory.create(mostovik_uid=None)
|
||||
|
||||
list_response = self.client.get("/api/v1/organizations/")
|
||||
detail_response = self.client.get(f"/api/v1/organizations/{organization.id}/")
|
||||
|
||||
self.assertEqual(list_response.status_code, status.HTTP_200_OK)
|
||||
self.assertEqual(list_response.data["count"], 0)
|
||||
self.assertEqual(detail_response.status_code, status.HTTP_404_NOT_FOUND)
|
||||
|
||||
organization.mostovik_uid = "11111111-1111-4111-8111-111111111111"
|
||||
organization.save(update_fields=["mostovik_uid", "updated_at"])
|
||||
|
||||
list_response = self.client.get("/api/v1/organizations/")
|
||||
detail_response = self.client.get(f"/api/v1/organizations/{organization.id}/")
|
||||
|
||||
self.assertEqual(list_response.data["count"], 1)
|
||||
self.assertEqual(detail_response.status_code, status.HTTP_200_OK)
|
||||
|
||||
def test_detail_includes_active_registries(self):
|
||||
organization = OrganizationFactory.create(
|
||||
short_name="АО «Бета»",
|
||||
|
||||
Reference in New Issue
Block a user