merge from main

This commit is contained in:
Kenneth Kehl
2024-07-23 07:20:05 -07:00
38 changed files with 2187 additions and 1292 deletions
@@ -67,7 +67,7 @@ SAMPLE_DATA = {
}
@pytest.fixture()
@pytest.fixture
def mock_get_orgs_and_services(mocker):
return mocker.patch(
"app.user_api_client.get_organizations_and_services_for_user",
@@ -7,7 +7,7 @@ from app.main.views.service_settings import PLATFORM_ADMIN_SERVICE_PERMISSIONS
from tests.conftest import normalize_spaces
@pytest.fixture()
@pytest.fixture
def get_service_settings_page(
client_request,
platform_admin_user,
@@ -33,7 +33,7 @@ from tests.conftest import (
FAKE_TEMPLATE_ID = uuid4()
@pytest.fixture()
@pytest.fixture
def _mock_get_service_settings_page_common(
mock_get_inbound_number_for_service,
mock_get_free_sms_fragment_limit,
+3 -3
View File
@@ -100,19 +100,19 @@ MOCK_JOBS = {
}
@pytest.fixture()
@pytest.fixture
def _mock_no_users_for_service(mocker):
mocker.patch("app.models.user.Users.client_method", return_value=[])
@pytest.fixture()
@pytest.fixture
def mock_get_existing_user_by_email(mocker, api_user_active):
return mocker.patch(
"app.user_api_client.get_user_by_email", return_value=api_user_active
)
@pytest.fixture()
@pytest.fixture
def mock_check_invite_token(mocker, sample_invite):
return mocker.patch("app.invite_api_client.check_token", return_value=sample_invite)
+1 -1
View File
@@ -1882,7 +1882,7 @@ def test_service_dashboard_shows_batched_jobs(
assert len(rows) == 1
@pytest.fixture()
@pytest.fixture
def app_with_socketio():
app = Flask("app")
create_app(app)
+1 -1
View File
@@ -9,7 +9,7 @@ from tests.conftest import (
)
@pytest.fixture()
@pytest.fixture
def mock_email_validated_recently(mocker):
return mocker.patch(
"app.main.views.two_factor.email_needs_revalidating", return_value=False
+1 -1
View File
@@ -12,7 +12,7 @@ VIS_PARENT_FOLDER_ID = "bbbb222b-2b22-2b22-222b-b222b22b2222"
INV_CHILD_2_FOLDER_ID = "fafe723f-1d39-4a10-865f-e551e03d8886"
@pytest.fixture()
@pytest.fixture
def _mock_get_hierarchy_of_folders(
mock_get_template_folders, active_user_with_permissions
):
+2 -2
View File
@@ -19,14 +19,14 @@ svg_filename = "test.svg"
upload_id = "test_uuid"
@pytest.fixture()
@pytest.fixture
def upload_filename(fake_uuid):
return EMAIL_LOGO_LOCATION_STRUCTURE.format(
temp=TEMP_TAG.format(user_id=fake_uuid), unique_id=upload_id, filename=filename
)
@pytest.fixture()
@pytest.fixture
def bucket_credentials(notify_admin):
return notify_admin.config["LOGO_UPLOAD_BUCKET"]
+1 -1
View File
@@ -13,7 +13,7 @@ bucket_credentials = {
}
@pytest.fixture()
@pytest.fixture
def vcap_services():
return {
"aws-elasticache-redis": [{"credentials": {"uri": "redis://xxx:6379"}}],
+1 -1
View File
@@ -71,7 +71,7 @@ def _get_notifications_csv(
return _get
@pytest.fixture()
@pytest.fixture
def get_notifications_csv_mock(
mocker,
api_user_active,