mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 00:33:58 -04:00
Move helper function
`test_utils.py` is actually a file for testing some utils, not some utils for testing. Test helper functions and fixtures are better placed in conftest, and also means that we can use them in conftest.
This commit is contained in:
@@ -8,8 +8,7 @@ from bs4 import BeautifulSoup
|
||||
|
||||
from app.main.views.jobs import get_time_left, get_status_filters
|
||||
from tests import notification_json
|
||||
from tests.conftest import SERVICE_ONE_ID, mock_get_notifications
|
||||
from tests.app.test_utils import normalize_spaces
|
||||
from tests.conftest import SERVICE_ONE_ID, mock_get_notifications, normalize_spaces
|
||||
from freezegun import freeze_time
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ from notifications_python_client.errors import HTTPError
|
||||
from tests.conftest import (
|
||||
SERVICE_ONE_ID,
|
||||
)
|
||||
from tests.app.test_utils import normalize_spaces
|
||||
from tests.conftest import normalize_spaces
|
||||
from freezegun import freeze_time
|
||||
from unittest import mock
|
||||
from app.main.views.conversation import get_user_number
|
||||
|
||||
@@ -21,8 +21,8 @@ from tests.conftest import (
|
||||
SERVICE_ONE_ID,
|
||||
mock_get_inbound_sms_summary,
|
||||
mock_get_inbound_sms_summary_with_no_messages,
|
||||
normalize_spaces,
|
||||
)
|
||||
from tests.app.test_utils import normalize_spaces
|
||||
|
||||
stub_template_stats = [
|
||||
{
|
||||
|
||||
@@ -8,8 +8,7 @@ from bs4 import BeautifulSoup
|
||||
|
||||
from app.main.views.jobs import get_time_left, get_status_filters
|
||||
from tests import notification_json
|
||||
from tests.app.test_utils import normalize_spaces
|
||||
from tests.conftest import SERVICE_ONE_ID
|
||||
from tests.conftest import SERVICE_ONE_ID, normalize_spaces
|
||||
from freezegun import freeze_time
|
||||
|
||||
|
||||
|
||||
@@ -8,8 +8,7 @@ from app.utils import (
|
||||
DELIVERED_STATUSES,
|
||||
)
|
||||
|
||||
from tests.app.test_utils import normalize_spaces
|
||||
from tests.conftest import mock_get_notification, SERVICE_ONE_ID
|
||||
from tests.conftest import mock_get_notification, SERVICE_ONE_ID, normalize_spaces
|
||||
|
||||
|
||||
@pytest.mark.parametrize('notification_status, expected_status', [
|
||||
|
||||
@@ -15,7 +15,6 @@ from notifications_utils.template import LetterPreviewTemplate, LetterImageTempl
|
||||
from notifications_utils.recipients import RecipientCSV
|
||||
|
||||
from tests import validate_route_permission, validate_route_permission_with_client
|
||||
from tests.app.test_utils import normalize_spaces
|
||||
from tests.conftest import (
|
||||
mock_get_service_template,
|
||||
mock_get_service_template_with_placeholders,
|
||||
@@ -23,6 +22,7 @@ from tests.conftest import (
|
||||
mock_get_service,
|
||||
mock_get_international_service,
|
||||
mock_get_service_email_template,
|
||||
normalize_spaces,
|
||||
SERVICE_ONE_ID,
|
||||
)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import app
|
||||
from app.main.views.service_settings import dummy_bearer_token
|
||||
from app.utils import email_safe
|
||||
from tests import validate_route_permission, service_json
|
||||
from tests.app.test_utils import normalize_spaces
|
||||
from tests.conftest import normalize_spaces
|
||||
|
||||
from tests.conftest import active_user_with_permissions, platform_admin_user
|
||||
|
||||
|
||||
@@ -7,9 +7,13 @@ from flask import url_for
|
||||
from freezegun import freeze_time
|
||||
from notifications_python_client.errors import HTTPError
|
||||
from tests.conftest import service_one as create_sample_service
|
||||
from tests.conftest import mock_get_service_email_template, mock_get_service_letter_template, SERVICE_ONE_ID
|
||||
from tests.conftest import (
|
||||
mock_get_service_email_template,
|
||||
mock_get_service_letter_template,
|
||||
normalize_spaces,
|
||||
SERVICE_ONE_ID,
|
||||
)
|
||||
from tests import validate_route_permission, template_json, single_notification_json
|
||||
from tests.app.test_utils import normalize_spaces
|
||||
|
||||
from app.main.views.templates import get_last_use_message, get_human_readable_delta
|
||||
|
||||
|
||||
Reference in New Issue
Block a user