mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-20 10:02:47 -05:00
fix or remove skipped tests
This commit is contained in:
@@ -15,7 +15,6 @@ from app.dao.templates_dao import dao_get_all_templates_for_service, dao_update_
|
||||
from app.enums import KeyType, NotificationType, TemplateType
|
||||
from app.errors import InvalidRequest
|
||||
from app.models import ApiKey, Notification, NotificationHistory, Template
|
||||
from app.service.send_notification import send_one_off_notification
|
||||
from notifications_python_client.authentication import create_jwt_token
|
||||
from notifications_utils import SMS_CHAR_COUNT_LIMIT
|
||||
from tests import create_service_authorization_header
|
||||
@@ -1154,7 +1153,7 @@ def test_should_allow_store_original_number_on_sms_notification(
|
||||
assert "1" == notifications[0].to
|
||||
|
||||
|
||||
@pytest.mark.skip("We don't support international at moment")
|
||||
# @pytest.mark.skip("We don't support international at moment")
|
||||
def test_should_not_allow_sending_to_international_number_without_international_permission(
|
||||
client, sample_template, mocker
|
||||
):
|
||||
@@ -1179,7 +1178,7 @@ def test_should_not_allow_sending_to_international_number_without_international_
|
||||
assert error_json["message"] == "Cannot send to international mobile numbers"
|
||||
|
||||
|
||||
@pytest.mark.skip("We don't support international at the moment")
|
||||
# @pytest.mark.skip("We don't support international at the moment")
|
||||
def test_should_allow_sending_to_international_number_with_international_permission(
|
||||
client, sample_service_full_permissions, mocker
|
||||
):
|
||||
@@ -1313,30 +1312,3 @@ def test_post_notification_should_set_reply_to_text(
|
||||
notifications = db.session.execute(select(Notification)).scalars().all()
|
||||
assert len(notifications) == 1
|
||||
assert notifications[0].reply_to_text == expected_reply_to
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Rewrite without letters?")
|
||||
@pytest.mark.parametrize("reference_paceholder,", [None, "ref2"])
|
||||
def test_send_notification_should_set_client_reference_from_placeholder(
|
||||
sample_letter_template, mocker, reference_paceholder
|
||||
):
|
||||
deliver_mock = mocker.patch(
|
||||
"app.celery.tasks.letters_pdf_tasks.get_pdf_for_templated_letter.apply_async"
|
||||
)
|
||||
data = {
|
||||
"template_id": sample_letter_template.id,
|
||||
"personalisation": {
|
||||
"address_line_1": "Jane",
|
||||
"address_line_2": "Moss Lane",
|
||||
"address_line_3": "SW1A 1AA",
|
||||
},
|
||||
"to": "Jane",
|
||||
"created_by": sample_letter_template.service.created_by_id,
|
||||
}
|
||||
if reference_paceholder:
|
||||
data["personalisation"]["reference"] = reference_paceholder
|
||||
|
||||
notification_id = send_one_off_notification(sample_letter_template.service_id, data)
|
||||
assert deliver_mock.called
|
||||
notification = db.session.get(Notification, notification_id["id"])
|
||||
assert notification.client_reference == reference_paceholder
|
||||
|
||||
@@ -97,7 +97,6 @@ def test_send_one_off_notification_calls_persist_correctly_for_sms(
|
||||
)
|
||||
|
||||
|
||||
# @pytest.mark.skip("We currently don't support international")
|
||||
def test_send_one_off_notification_calls_persist_correctly_for_international_sms(
|
||||
persist_mock, celery_mock, notify_db_session
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user