feat(admin): expand exchange admin and unify admin UX
Some checks failed
CI/CD Pipeline / Code Quality Checks (pull_request) Failing after 2m39s
CI/CD Pipeline / Run Tests (pull_request) Successful in 3m0s
CI/CD Pipeline / Run API Inventory E2E Tests (pull_request) Successful in 35s
CI/CD Pipeline / Telegram Notify Success (pull_request) Has been skipped

This commit is contained in:
2026-03-24 13:58:24 +01:00
parent 559b9bc5ef
commit c98ba76081
33 changed files with 2915 additions and 209 deletions

View File

@@ -593,16 +593,18 @@ class ExchangeApiInventoryE2ETest(AuthenticatedApiMixin, APITestCase):
self.admin = UserFactory.create_superuser()
@patch("apps.exchange.services.ExchangeConnectionService.validate_target_structure")
@patch("apps.exchange.services.ExchangeConnectionService.prepare_target_structure")
@patch("apps.exchange.services.ExchangeConnectionService.test_connection")
@patch("apps.exchange.services.ExchangeConnectionService.test_connection_payload")
@patch("apps.exchange.views.copy_parsers_data_async.delay")
@patch("apps.exchange.views.copy_parsers_data_async")
@patch("apps.exchange.services.ExchangeConnectionService.get_active_connection")
def test_exchange_endpoints(
self,
get_active_connection_mock,
delay_mock,
copy_task_mock,
test_connection_payload_mock,
_test_connection_mock,
_prepare_mock,
_validate_mock,
):
self.authenticate(self.admin)
@@ -623,6 +625,7 @@ class ExchangeApiInventoryE2ETest(AuthenticatedApiMixin, APITestCase):
"status": "success",
"message": "ok",
}
_test_connection_mock.return_value = "exchange_target_test"
list_connections = self.client.get(connections_url)
create_connection = self.client.post(
@@ -640,7 +643,7 @@ class ExchangeApiInventoryE2ETest(AuthenticatedApiMixin, APITestCase):
id=create_connection.data["id"]
)
get_active_connection_mock.return_value = active_connection
delay_mock.return_value = SimpleNamespace(id="exchange-task-1")
copy_task_mock.delay.return_value = SimpleNamespace(id="exchange-task-1")
copy_response = self.client.post(copy_url, {"mode": "all"}, format="json")
list_periodic = self.client.get(periodic_tasks_url)