From 423f14831d9ce86bd0b00a13d7e094dab864c9b6 Mon Sep 17 00:00:00 2001 From: igor_nadein Date: Mon, 16 Feb 2026 16:47:17 +0300 Subject: [PATCH] test: fix import errors after views.py split - Fix IndentationError in test_poll_complete.py (remove duplicate lines) - Fix ImportError in test_ldap_optional_helpers.py (update import path to _helpers module) Tests now collect 515 items without collection errors. 11 pre-existing test failures remain (auth registration issues unrelated to refactoring). --- backend/tests/api/v1/communications/test_poll_complete.py | 5 ----- backend/tests/api/v1/employees/test_ldap_optional_helpers.py | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/backend/tests/api/v1/communications/test_poll_complete.py b/backend/tests/api/v1/communications/test_poll_complete.py index 8581e148..8fe07b45 100644 --- a/backend/tests/api/v1/communications/test_poll_complete.py +++ b/backend/tests/api/v1/communications/test_poll_complete.py @@ -644,8 +644,3 @@ class TestPollEdgeCases: # total_voters должен быть 1, не 2 assert response.data['results']['total_voters'] == 1 - url, {'option_ids': [opt1.id, opt2.id]}, format='json' - ) - - # total_voters должен быть 1, не 2 - assert response.data['results']['total_voters'] == 1 diff --git a/backend/tests/api/v1/employees/test_ldap_optional_helpers.py b/backend/tests/api/v1/employees/test_ldap_optional_helpers.py index 7ad5f001..851582f6 100644 --- a/backend/tests/api/v1/employees/test_ldap_optional_helpers.py +++ b/backend/tests/api/v1/employees/test_ldap_optional_helpers.py @@ -8,7 +8,7 @@ import pytest from unittest.mock import Mock from rest_framework.response import Response -from api.v1.employees.views import _is_ldap_enabled, _ldap_try +from api.v1.employees.views._helpers import _is_ldap_enabled, _ldap_try from employees.ldap.errors import ( DirectoryLdapError, DirectoryServiceError,