Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Société Française du Radiotéléphone (SFR) Support #1132

Merged
merged 12 commits into from
Jun 9, 2024

Conversation

Anghille
Copy link
Contributor

@Anghille Anghille commented May 27, 2024

Description:

Related issue (if applicable): #

New Service Completion Status

  • apprise/plugins/sfr.py
  • KEYWORDS
    • sfr
  • README.md
    • add entry for new service to table (as a quick reference)
  • packaging/redhat/python-apprise.spec
    • add new service into the %global common_description

Syntax

Valid syntax is as follows (params can be stacked with params=value,params2=values2... ):

  • sfr://{user}:{password}@{space_id}/{targets}
  • sfr://{user}:{password}@{space_id}/{targets}?{lang=en_ENG}
  • sfr://{user}:{password}@{space_id}/{targets}?{media=<SMS/SMSLong/SMSUnicode/SMSUnicodeLong>}
  • sfr://{user}:{password}@{space_id}/{targets}/?{from=<your_OADC_name>}
  • sfr://{user}:{password}@{space_id}/{targets}?{timout=2880}
  • sfr://{user}:{password}@{space_id}/{targets}?{voice=<claire08s/laura8k>}
Variable Required Description
user Yes This is the service ID associated with your SFR Business DMC account
password Yes This is the Client API Key associated with your SFR Business DMC account
space_id Yes This is logical space containing a set of clients (phone numbers) associated with your SFR Business DMC account
to Yes This is the Phone Number that will receive the notification
lang No (default value set) This is required by SFR when sending an SMS. Default to fr_FR
from no This is the sender name that will be seen when people receive the sms. It MUST be registered previously in the SFR Business DMC Account
timeout No This is the time after which the SMS will be dropped by SFR. Default to 2880 minutes
voice No This is the voice used when SMS is encoded as a vocal. Not applicable in apprise, but must be set for API compatibility reasons. Default to claire08s.

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (use flake8)
  • 100% test coverage

Testing

Anyone can help test this source code as follows:

# Create a virtual environment to work in as follows:
python3 -m venv apprise

# Change into our new directory
cd apprise

# Activate our virtual environment
source bin/activate

# Install the branch
pip install git+https://github.com/caronc/apprise.git@sfr-support

# Test out the changes with the following command:
apprise -t "" -b "Test Message" \
  "sfr://<user>:<password>@<space_id>/<to>"

@Anghille
Copy link
Contributor Author

Latest commit fixed all (discovered) bugs :)

@caronc
Copy link
Owner

caronc commented May 28, 2024

It sure looks like it did. Can you tell me a bit about srf? I'm not familiar with it.

@Anghille
Copy link
Contributor Author

Anghille commented May 29, 2024

I am unsure where the error comes from in the test packaging / target rpmbuild.el8. All tests run successfuly on my local machine. I also tested it directly using the apprise CLI, and manged to successfuly send SMS to multiple smartphones (both mine and other people to test it out, with and withtout unicode characters).

SFR is one of the 4 main French Telecom (internet and mobile provider among other things), alongside Free mobile, Bouygues Telecom and Orange.

@caronc
Copy link
Owner

caronc commented May 30, 2024

I did some heavy refactoring to your code; make sure to do a git pull so your local copy is updated. I did not update all of the tests yet, but you'll see the changes i made so that it aligns better with the other plugins.

A good source you can reference is plugins/smeagle.py and plugins/vonage.py as they are similar phone services to yours.

The changes allow you to target more the one endpoint. I also tried to follow a bit more of the standards in the other plugins.

have a look; you're getting close! :)

@Anghille
Copy link
Contributor Author

Anghille commented May 31, 2024

Ok I figured out what my mistake was. It is my first time I contribute to opensource code like this, and didnt test my code against ALL supported python version used by apprise officially. It took me a while to realise the error thrown was due to typing error (dict typing doesnt exist in 3.6, I must use from typing import Dict and use this Dict object instead). I am on route to fix this, and test my code against ALL python version. Sorry for the inconveniance

Edit. Just saw your message, had not refrshed the page since I looked for the bugs. I am pulling your changes now.
I heavely used discord and freemobile as the plugin source of reference, which must not conform to the standards ?

@Anghille
Copy link
Contributor Author

Anghille commented May 31, 2024

Ok I just finished to test out ALL python version from 3.6 to 3.12 included.
All tests (for SFR) passes (finally) and the coverage is 100% for all versions :

Exemple of outputs

For python 3.6

Performing PEP8 check...
PEP8 check succeeded; no errors found! :)

Running test coverage check...
============================================================== test session starts ===============================================================
platform darwin -- Python 3.6.8, pytest-7.0.1, pluggy-1.0.0 -- /.venv/bin/python
cachedir: .pytest_cache
rootdir: /apprise, configfile: setup.cfg
plugins: xdist-3.0.2, mock-3.6.1, cov-4.0.0
collected 485 items / 476 deselected / 2 skipped / 7 selected                                                                                    

test/test_plugin_sfr.py::test_plugin_sfr_urls PASSED                                                                                       [ 11%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_ok PASSED                                                                            [ 22%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_multiple_targets_ok PASSED                                                           [ 33%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_ko PASSED                                                                            [ 44%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_multiple_targets_all_ko PASSED                                                       [ 55%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_multiple_targets_one_ko PASSED                                                       [ 66%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_exceptions PASSED                                                                    [ 77%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_exceptions_requests PASSED                                                           [ 88%]
test/test_plugin_sfr.py::test_plugin_sfr_failure PASSED                                                                                    [100%]

============================================================ short test summary info =============================================================
SKIPPED [1] test/test_plugin_glib.py:48: Skipping dbus-python based tests
SKIPPED [1] test/test_plugin_syslog.py:42: Skipping syslog based tests
================================================== 9 passed, 2 skipped, 476 deselected in 6.77s ==================================================
Combined data file .coverage-reports/.coverage.86701.625594
Wrote XML report to coverage.xml
Coverage failure: total of 23 is less than fail-under=95
Name                                Stmts   Miss Branch BrPart  Cover   Missing
-------------------------------------------------------------------------------
apprise/plugins/sendgrid.py           133    105     62      0    15%   165-244, 252-275, 289, 296-408, 418-475
apprise/plugins/serverchan.py          50     32      8      0    34%   85-94, 100-150, 157, 167-176
apprise/plugins/ses.py                270    225    106      0    12%   229-363, 371-501, 517-570, 581-666, 674-690, 725-771, 779-807, 827-828, 837-942
apprise/plugins/signal_api.py         138    109     52      0    16%   166-218, 226-373, 381-420, 440-446, 456-491
apprise/plugins/simplepush.py         108     76     26      0    25%   44-50, 132-158, 165-186, 194-284, 292-307, 321-335
apprise/plugins/sinch.py              131    100     46      0    20%   175-246, 253-382, 390-397, 411-412, 421-471
apprise/plugins/slack.py              291    242    131      0    14%   323-391, 400-711, 718-867, 874-1019, 1027-1057, 1071, 1080-1148, 1156-1173
apprise/plugins/smseagle.py           183    139     58      0    21%   218-323, 331-565, 573-594, 623-635, 646-689
apprise/plugins/smsmanager.py         115     84     42      0    22%   158-200, 207-315, 323-335, 354-360, 370-413
apprise/plugins/smtp2go.py            179    147     82      0    13%   168-263, 274-465, 473-504, 522-528, 537-581
apprise/plugins/sns.py                188    149     56      0    17%   168-233, 240-307, 323-376, 387-473, 481-497, 528-574, 582-584, 606, 615-697
apprise/plugins/sparkpost.py          235    195    106      0    13%   232-348, 359-490, 500-671, 679-714, 732-738, 747-800
apprise/plugins/splunk.py             134     93     60      0    24%   220-282, 290-383, 391-402, 421-461, 470-488
apprise/plugins/streamlabs.py         129    100     46      0    20%   189-274, 281-377, 385-402, 418-469
apprise/plugins/synology.py            89     67     32      0    20%   137-157, 165-191, 212-298, 307-338
apprise/plugins/syslog.py              91     51     28      0    39%   174-211, 218-243, 251-259, 274-323
-------------------------------------------------------------------------------
TOTAL                               18175  13061   6984    128    23%

11 files skipped due to complete coverage.
Coverage failure: total of 23 is less than fail-under=95

For python 3.12

Performing PEP8 check...
PEP8 check succeeded; no errors found! :)

Running test coverage check...
============================================================== test session starts ===============================================================
platform darwin -- Python 3.12.3, pytest-8.2.1, pluggy-1.5.0 -- /.venv/bin/python
cachedir: .pytest_cache
rootdir: /apprise
configfile: setup.cfg
plugins: cov-5.0.0, mock-3.14.0, xdist-3.6.1
collected 485 items / 476 deselected / 2 skipped / 9 selected                                                                                    

test/test_plugin_sfr.py::test_plugin_sfr_urls PASSED                                                                                       [ 11%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_ok PASSED                                                                            [ 22%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_multiple_targets_ok PASSED                                                           [ 33%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_ko PASSED                                                                            [ 44%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_multiple_targets_all_ko PASSED                                                       [ 55%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_multiple_targets_one_ko PASSED                                                       [ 66%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_exceptions PASSED                                                                    [ 77%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_exceptions_requests PASSED                                                           [ 88%]
test/test_plugin_sfr.py::test_plugin_sfr_failure PASSED                                                                                    [100%]

============================================================ short test summary info =============================================================
SKIPPED [1] test/test_plugin_glib.py:48: Skipping dbus-python based tests
SKIPPED [1] test/test_plugin_syslog.py:42: Skipping syslog based tests
================================================== 9 passed, 2 skipped, 476 deselected in 6.29s ==================================================
Combined data file .coverage-reports/.coverage.86315.XVeaZdjx
Wrote XML report to coverage.xml
Coverage failure: total of 24 is less than fail-under=95
Name                                Stmts   Miss Branch BrPart  Cover   Missing
-------------------------------------------------------------------------------
apprise/plugins/sendgrid.py           134    105     52      0    17%   165-244, 252-275, 289, 296-408, 418-475
apprise/plugins/serverchan.py          51     32      8      0    36%   85-94, 100-150, 157, 167-176
apprise/plugins/ses.py                272    225    100      0    14%   229-363, 371-501, 517-570, 581-666, 674-690, 725-771, 779-807, 827-828, 837-942
apprise/plugins/signal_api.py         139    109     50      0    17%   166-218, 226-373, 381-420, 440-446, 456-491
apprise/plugins/simplepush.py         109     76     24      0    26%   44-50, 132-158, 165-186, 194-284, 292-307, 321-335
apprise/plugins/sinch.py              132    100     42      0    20%   175-246, 253-382, 390-397, 411-412, 421-471
apprise/plugins/slack.py              293    242    123      0    14%   323-391, 400-711, 718-867, 874-1019, 1027-1057, 1071, 1080-1148, 1156-1173
apprise/plugins/smseagle.py           179    134     54      0    20%   218-323, 331-565, 573-594, 623-635, 646-689
apprise/plugins/smsmanager.py         116     84     36      0    22%   158-200, 207-315, 323-335, 354-360, 370-413
apprise/plugins/smtp2go.py            180    147     70      0    14%   168-263, 274-465, 473-504, 522-528, 537-581
apprise/plugins/sns.py                190    149     54      0    18%   168-233, 240-307, 323-376, 387-473, 481-497, 528-574, 582-584, 606, 615-697
apprise/plugins/sparkpost.py          236    195     86      0    13%   232-348, 359-490, 500-671, 679-714, 732-738, 747-800
apprise/plugins/splunk.py             136     93     54      0    25%   220-282, 290-383, 391-402, 421-461, 470-488
apprise/plugins/streamlabs.py         130    100     42      0    19%   189-274, 281-377, 385-402, 418-469
apprise/plugins/synology.py            90     67     28      0    21%   137-157, 165-191, 212-298, 307-338
apprise/plugins/syslog.py              92     51     24      0    37%   174-211, 218-243, 251-259, 274-323
-------------------------------------------------------------------------------
TOTAL                               18338  13063   6531    128    24%

11 files skipped due to complete coverage.
Coverage failure: total of 24 is less than fail-under=95

@Anghille
Copy link
Contributor Author

Anghille commented May 31, 2024

I tried to check all tests with python 3.10.0 and 3.10.14 in local, with success :

bin/checkdone.sh    
Performing PEP8 check...
PEP8 check succeeded; no errors found! :)

Running test coverage check...
================================================================= test session starts ==================================================================
platform darwin -- Python 3.10.14, pytest-8.2.1, pluggy-1.5.0 -- /apprise/.venv/bin/python
cachedir: .pytest_cache
rootdir: /apprise
configfile: setup.cfg
plugins: cov-5.0.0, mock-3.14.0, xdist-3.6.1
collected 485 items / 2 skipped 
[...]
test/test_plugin_macosx.py::test_plugin_macosx_general_success PASSED                                                                            [ 50%]
test/test_plugin_macosx.py::test_plugin_macosx_terminal_notifier_not_executable PASSED                                                           [ 51%]
test/test_plugin_macosx.py::test_plugin_macosx_terminal_notifier_invalid PASSED                                                                  [ 51%]
test/test_plugin_macosx.py::test_plugin_macosx_terminal_notifier_croaks PASSED                                                                   [ 51%]
test/test_plugin_macosx.py::test_plugin_macosx_pretend_linux PASSED                                                                              [ 51%]
test/test_plugin_macosx.py::test_plugin_macosx_pretend_old_macos[9.12] PASSED                                                                    [ 51%]
test/test_plugin_macosx.py::test_plugin_macosx_pretend_old_macos[10.7] PASSED                                                                    [ 52%]
test/test_plugin_mailgun.py::test_plugin_mailgun_urls PASSED                                                                                     [ 52%]
test/test_plugin_mailgun.py::test_plugin_mailgun_attachments PASSED                                                                              [ 52%]
test/test_plugin_mailgun.py::test_plugin_mailgun_header_check PASSED                                                                             [ 52%]
test/test_plugin_mastodon.py::test_plugin_mastodon_urls PASSED                                                                                   [ 52%]
test/test_plugin_mastodon.py::test_plugin_mastodon_general PASSED                                                                                [ 53%]
test/test_plugin_mastodon.py::test_plugin_mastodon_attachments PASSED                                                                            [ 53%]
test/test_plugin_matrix.py::test_plugin_matrix_urls PASSED                                                                                       [ 53%]
test/test_plugin_matrix.py::test_plugin_matrix_general PASSED                                                                                    [ 53%]
test/test_plugin_matrix.py::test_plugin_matrix_fetch PASSED                                                                                      [ 54%]
test/test_plugin_matrix.py::test_plugin_matrix_auth PASSED                                                                                       [ 54%]
test/test_plugin_matrix.py::test_plugin_matrix_rooms PASSED                                                                                      [ 54%]
test/test_plugin_matrix.py::test_plugin_matrix_url_parsing PASSED                                                                                [ 54%]
test/test_plugin_matrix.py::test_plugin_matrix_image_errors PASSED                                                                               [ 54%]
test/test_plugin_matrix.py::test_plugin_matrix_attachments_api_v3 PASSED                                                                         [ 55%]
test/test_plugin_matrix.py::test_plugin_matrix_attachments_api_v2 PASSED                                                                         [ 55%]
test/test_plugin_matrix.py::test_plugin_matrix_transaction_ids_api_v3 PASSED                                                                     [ 55%]
test/test_plugin_mattermost.py::test_plugin_mattermost_urls PASSED                                                                               [ 55%]
test/test_plugin_mattermost.py::test_plugin_mattermost_edge_cases PASSED                                                                         [ 55%]
test/test_plugin_messagebird.py::test_plugin_messagebird_urls PASSED                                                                             [ 56%]
test/test_plugin_messagebird.py::test_plugin_messagebird_edge_cases PASSED                                                                       [ 56%]
test/test_plugin_misskey.py::test_plugin_misskey_urls PASSED                                                                                     [ 56%]
test/test_plugin_mqtt.py::test_plugin_mqtt_paho_import_error PASSED                                                                              [ 56%]
test/test_plugin_mqtt.py::test_plugin_mqtt_default_success SKIPPED (Requires that `paho-mqtt` is installed)                                      [ 56%]
test/test_plugin_mqtt.py::test_plugin_mqtt_multiple_topics_success SKIPPED (Requires that `paho-mqtt` is installed)                              [ 57%]
test/test_plugin_mqtt.py::test_plugin_mqtt_to_success SKIPPED (Requires that `paho-mqtt` is installed)                                           [ 57%]
test/test_plugin_mqtt.py::test_plugin_mqtt_valid_settings_success SKIPPED (Requires that `paho-mqtt` is installed)                               [ 57%]
test/test_plugin_mqtt.py::test_plugin_mqtt_invalid_settings_failure SKIPPED (Requires that `paho-mqtt` is installed)                             [ 57%]
test/test_plugin_mqtt.py::test_plugin_mqtt_bad_url_failure SKIPPED (Requires that `paho-mqtt` is installed)                                      [ 57%]
test/test_plugin_mqtt.py::test_plugin_mqtt_no_topic_failure SKIPPED (Requires that `paho-mqtt` is installed)                                     [ 58%]
test/test_plugin_mqtt.py::test_plugin_mqtt_tls_connect_success SKIPPED (Requires that `paho-mqtt` is installed)                                  [ 58%]
test/test_plugin_mqtt.py::test_plugin_mqtt_tls_no_certificates_failure SKIPPED (Requires that `paho-mqtt` is installed)                          [ 58%]
test/test_plugin_mqtt.py::test_plugin_mqtt_tls_no_verify_success SKIPPED (Requires that `paho-mqtt` is installed)                                [ 58%]
test/test_plugin_mqtt.py::test_plugin_mqtt_session_client_id_success SKIPPED (Requires that `paho-mqtt` is installed)                            [ 58%]
test/test_plugin_mqtt.py::test_plugin_mqtt_connect_failure SKIPPED (Requires that `paho-mqtt` is installed)                                      [ 59%]
test/test_plugin_mqtt.py::test_plugin_mqtt_reconnect_failure SKIPPED (Requires that `paho-mqtt` is installed)                                    [ 59%]
test/test_plugin_mqtt.py::test_plugin_mqtt_publish_failure SKIPPED (Requires that `paho-mqtt` is installed)                                      [ 59%]
test/test_plugin_mqtt.py::test_plugin_mqtt_exception_failure SKIPPED (Requires that `paho-mqtt` is installed)                                    [ 59%]
test/test_plugin_mqtt.py::test_plugin_mqtt_not_published_failure SKIPPED (Requires that `paho-mqtt` is installed)                                [ 60%]
test/test_plugin_mqtt.py::test_plugin_mqtt_not_published_recovery_success SKIPPED (Requires that `paho-mqtt` is installed)                       [ 60%]
test/test_plugin_msg91.py::test_plugin_msg91_urls PASSED                                                                                         [ 60%]
test/test_plugin_msg91.py::test_plugin_msg91_edge_cases PASSED                                                                                   [ 60%]
test/test_plugin_msg91.py::test_plugin_msg91_keywords PASSED                                                                                     [ 60%]
test/test_plugin_msteams.py::test_plugin_msteams_urls PASSED                                                                                     [ 61%]
test/test_plugin_msteams.py::test_plugin_msteams_templating_basic_success PASSED                                                                 [ 61%]
test/test_plugin_msteams.py::test_plugin_msteams_templating_invalid_json PASSED                                                                  [ 61%]
test/test_plugin_msteams.py::test_plugin_msteams_templating_json_missing_type PASSED                                                             [ 61%]
test/test_plugin_msteams.py::test_plugin_msteams_templating_json_missing_context PASSED                                                          [ 61%]
test/test_plugin_msteams.py::test_plugin_msteams_templating_load_json_failure PASSED                                                             [ 62%]
test/test_plugin_msteams.py::test_plugin_msteams_templating_target_success PASSED                                                                [ 62%]
test/test_plugin_msteams.py::test_msteams_yaml_config_invalid_template_filename PASSED                                                           [ 62%]
test/test_plugin_msteams.py::test_msteams_yaml_config_token_identifiers PASSED                                                                   [ 62%]
test/test_plugin_msteams.py::test_msteams_yaml_config_no_bullet_under_url_1 PASSED                                                               [ 62%]
test/test_plugin_msteams.py::test_msteams_yaml_config_dictionary_file PASSED                                                                     [ 63%]
test/test_plugin_msteams.py::test_msteams_yaml_config_no_bullet_under_url_2 PASSED                                                               [ 63%]
test/test_plugin_msteams.py::test_msteams_yaml_config_combined PASSED                                                                            [ 63%]
test/test_plugin_msteams.py::test_msteams_yaml_config_token_mismatch PASSED                                                                      [ 63%]
test/test_plugin_msteams.py::test_plugin_msteams_edge_cases PASSED                                                                               [ 63%]
test/test_plugin_nextcloud.py::test_plugin_nextcloud_urls PASSED                                                                                 [ 64%]
test/test_plugin_nextcloud.py::test_plugin_nextcloud_edge_cases PASSED                                                                           [ 64%]
test/test_plugin_nextcloud.py::test_plugin_nextcloud_url_prefix PASSED                                                                           [ 64%]
test/test_plugin_nextcloudtalk.py::test_plugin_nextcloudtalk_urls PASSED                                                                         [ 64%]
test/test_plugin_nextcloudtalk.py::test_plugin_nextcloudtalk_edge_cases PASSED                                                                   [ 64%]
test/test_plugin_nextcloudtalk.py::test_plugin_nextcloud_talk_url_prefix PASSED                                                                  [ 65%]
test/test_plugin_notica.py::test_plugin_notica_urls PASSED                                                                                       [ 65%]
test/test_plugin_notifiarr.py::test_plugin_custom_notifiarr_urls PASSED                                                                          [ 65%]
test/test_plugin_notifico.py::test_plugin_notifico_urls PASSED                                                                                   [ 65%]
test/test_plugin_ntfy.py::test_plugin_ntfy_chat_urls PASSED                                                                                      [ 65%]
test/test_plugin_ntfy.py::test_plugin_ntfy_attachments PASSED                                                                                    [ 66%]
test/test_plugin_ntfy.py::test_plugin_custom_ntfy_edge_cases PASSED                                                                              [ 66%]
test/test_plugin_ntfy.py::test_plugin_ntfy_config_files PASSED                                                                                   [ 66%]
test/test_plugin_office365.py::test_plugin_office365_urls PASSED                                                                                 [ 66%]
test/test_plugin_office365.py::test_plugin_office365_general PASSED                                                                              [ 67%]
test/test_plugin_office365.py::test_plugin_office365_authentication PASSED                                                                       [ 67%]
test/test_plugin_onesignal.py::test_plugin_onesignal_urls PASSED                                                                                 [ 67%]
test/test_plugin_onesignal.py::test_plugin_onesignal_edge_cases PASSED                                                                           [ 67%]
test/test_plugin_opsgenie.py::test_plugin_opsgenie_urls PASSED                                                                                   [ 67%]
test/test_plugin_opsgenie.py::test_plugin_opsgenie_config_files PASSED                                                                           [ 68%]
test/test_plugin_pagerduty.py::test_plugin_pagerduty_urls PASSED                                                                                 [ 68%]
test/test_plugin_pagertree.py::test_plugin_pagertree_urls PASSED                                                                                 [ 68%]
test/test_plugin_pagertree.py::test_plugin_pagertree_general PASSED                                                                              [ 68%]
test/test_plugin_parse_platform.py::test_plugin_parse_platform_urls PASSED                                                                       [ 68%]
test/test_plugin_popcorn_notify.py::test_plugin_popcorn_notify_urls PASSED                                                                       [ 69%]
test/test_plugin_prowl.py::test_plugin_prowl PASSED                                                                                              [ 69%]
test/test_plugin_prowl.py::test_plugin_prowl_edge_cases PASSED                                                                                   [ 69%]
test/test_plugin_prowl.py::test_plugin_prowl_config_files PASSED                                                                                 [ 69%]
test/test_plugin_pushbullet.py::test_plugin_pushbullet_urls PASSED                                                                               [ 69%]
test/test_plugin_pushbullet.py::test_plugin_pushbullet_attachments PASSED                                                                        [ 70%]
test/test_plugin_pushbullet.py::test_plugin_pushbullet_edge_cases PASSED                                                                         [ 70%]
test/test_plugin_pushdeer.py::test_plugin_pushdeer_urls PASSED                                                                                   [ 70%]
test/test_plugin_pushdeer.py::test_plugin_pushdeer_general PASSED                                                                                [ 70%]
test/test_plugin_pushed.py::test_plugin_pushed_urls PASSED                                                                                       [ 70%]
test/test_plugin_pushed.py::test_plugin_pushed_edge_cases PASSED                                                                                 [ 71%]
test/test_plugin_pushjet.py::test_plugin_pushjet_urls PASSED                                                                                     [ 71%]
test/test_plugin_pushjet.py::test_plugin_pushjet_edge_cases PASSED                                                                               [ 71%]
test/test_plugin_pushme.py::test_plugin_pushme_urls PASSED                                                                                       [ 71%]
test/test_plugin_pushover.py::test_plugin_pushover_urls PASSED                                                                                   [ 71%]
test/test_plugin_pushover.py::test_plugin_pushover_attachments PASSED                                                                            [ 72%]
test/test_plugin_pushover.py::test_plugin_pushover_edge_cases PASSED                                                                             [ 72%]
test/test_plugin_pushover.py::test_plugin_pushover_config_files PASSED                                                                           [ 72%]
test/test_plugin_pushsafer.py::test_plugin_pushsafer_urls PASSED                                                                                 [ 72%]
test/test_plugin_pushsafer.py::test_plugin_pushsafer_general PASSED                                                                              [ 72%]
test/test_plugin_pushy.py::test_plugin_pushy_urls PASSED                                                                                         [ 73%]
test/test_plugin_reddit.py::test_plugin_reddit_urls PASSED                                                                                       [ 73%]
test/test_plugin_reddit.py::test_plugin_reddit_general PASSED                                                                                    [ 73%]
test/test_plugin_revolt.py::test_plugin_revolt_urls PASSED                                                                                       [ 73%]
test/test_plugin_revolt.py::test_plugin_revolt_notifications PASSED                                                                              [ 74%]
test/test_plugin_revolt.py::test_plugin_revolt_general PASSED                                                                                    [ 74%]
test/test_plugin_revolt.py::test_plugin_revolt_overflow PASSED                                                                                   [ 74%]
test/test_plugin_revolt.py::test_plugin_revolt_markdown_extra PASSED                                                                             [ 74%]
test/test_plugin_rocket_chat.py::test_plugin_rocket_chat_urls PASSED                                                                             [ 74%]
test/test_plugin_rocket_chat.py::test_plugin_rocket_chat_edge_cases PASSED                                                                       [ 75%]
test/test_plugin_rsyslog.py::test_plugin_rsyslog_by_url PASSED                                                                                   [ 75%]
test/test_plugin_rsyslog.py::test_plugin_rsyslog_edge_cases PASSED                                                                               [ 75%]
test/test_plugin_ryver.py::test_plugin_ryver_urls PASSED                                                                                         [ 75%]
test/test_plugin_ryver.py::test_plugin_ryver_edge_cases PASSED                                                                                   [ 75%]
test/test_plugin_sendgrid.py::test_plugin_sendgrid_urls PASSED                                                                                   [ 76%]
test/test_plugin_sendgrid.py::test_plugin_sendgrid_edge_cases PASSED                                                                             [ 76%]
test/test_plugin_serverchan.py::test_plugin_serverchan_urls PASSED                                                                               [ 76%]
test/test_plugin_ses.py::test_plugin_ses_urls PASSED                                                                                             [ 76%]
test/test_plugin_ses.py::test_plugin_ses_edge_cases PASSED                                                                                       [ 76%]
test/test_plugin_ses.py::test_plugin_ses_url_parsing PASSED                                                                                      [ 77%]
test/test_plugin_ses.py::test_plugin_ses_aws_response_handling PASSED                                                                            [ 77%]
test/test_plugin_ses.py::test_plugin_ses_attachments PASSED                                                                                      [ 77%]
test/test_plugin_sfr.py::test_plugin_sfr_urls PASSED                                                                                             [ 77%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_ok PASSED                                                                                  [ 77%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_multiple_targets_ok PASSED                                                                 [ 78%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_ko PASSED                                                                                  [ 78%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_multiple_targets_all_ko PASSED                                                             [ 78%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_multiple_targets_one_ko PASSED                                                             [ 78%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_exceptions PASSED                                                                          [ 78%]
test/test_plugin_sfr.py::test_plugin_sfr_notification_exceptions_requests PASSED                                                                 [ 79%]
test/test_plugin_sfr.py::test_plugin_sfr_failure PASSED                                                                                          [ 79%]
test/test_plugin_signal.py::test_plugin_signal_urls PASSED                                                                                       [ 79%]
test/test_plugin_signal.py::test_plugin_signal_edge_cases PASSED                                                                                 [ 79%]
test/test_plugin_signal.py::test_plugin_signal_yaml_config PASSED                                                                                [ 80%]
test/test_plugin_signal.py::test_plugin_signal_based_on_feedback PASSED                                                                          [ 80%]
test/test_plugin_signal.py::test_notify_signal_plugin_attachments PASSED                                                                         [ 80%]
test/test_plugin_simplepush.py::test_plugin_simplepush_urls SKIPPED (Requires cryptography)                                                      [ 80%]
test/test_plugin_simplepush.py::test_plugin_fcm_cryptography_import_error PASSED                                                                 [ 80%]
test/test_plugin_simplepush.py::test_plugin_simplepush_edge_cases SKIPPED (Requires cryptography)                                                [ 81%]
test/test_plugin_simplepush.py::test_plugin_simplepush_general SKIPPED (Requires cryptography)                                                   [ 81%]
test/test_plugin_sinch.py::test_plugin_sinch_urls PASSED                                                                                         [ 81%]
test/test_plugin_sinch.py::test_plugin_sinch_edge_cases PASSED                                                                                   [ 81%]
test/test_plugin_slack.py::test_plugin_slack_urls PASSED                                                                                         [ 81%]
test/test_plugin_slack.py::test_plugin_slack_oauth_access_token PASSED                                                                           [ 82%]
test/test_plugin_slack.py::test_plugin_slack_webhook_mode PASSED                                                                                 [ 82%]
test/test_plugin_slack.py::test_plugin_slack_send_by_email PASSED                                                                                [ 82%]
test/test_plugin_slack.py::test_plugin_slack_markdown PASSED                                                                                     [ 82%]
test/test_plugin_slack.py::test_plugin_slack_single_thread_reply PASSED                                                                          [ 82%]
test/test_plugin_slack.py::test_plugin_slack_multiple_thread_reply PASSED                                                                        [ 83%]
test/test_plugin_sms_manager.py::test_plugin_smsmgr_urls PASSED                                                                                  [ 83%]
test/test_plugin_sms_manager.py::test_plugin_smsmgr_edge_cases PASSED                                                                            [ 83%]
test/test_plugin_smseagle.py::test_plugin_smseagle_urls PASSED                                                                                   [ 83%]
test/test_plugin_smseagle.py::test_plugin_smseagle_edge_cases PASSED                                                                             [ 83%]
test/test_plugin_smseagle.py::test_plugin_smseagle_result_set PASSED                                                                             [ 84%]
test/test_plugin_smseagle.py::test_notify_smseagle_plugin_result_list PASSED                                                                     [ 84%]
test/test_plugin_smseagle.py::test_notify_smseagle_plugin_attachments PASSED                                                                     [ 84%]
test/test_plugin_smtp2go.py::test_plugin_smtp2go_urls PASSED                                                                                     [ 84%]
test/test_plugin_smtp2go.py::test_plugin_smtp2go_attachments PASSED                                                                              [ 84%]
test/test_plugin_sns.py::test_plugin_sns_urls PASSED                                                                                             [ 85%]
test/test_plugin_sns.py::test_plugin_sns_edge_cases PASSED                                                                                       [ 85%]
test/test_plugin_sns.py::test_plugin_sns_url_parsing PASSED                                                                                      [ 85%]
test/test_plugin_sns.py::test_plugin_sns_object_parsing PASSED                                                                                   [ 85%]
test/test_plugin_sns.py::test_plugin_sns_aws_response_handling PASSED                                                                            [ 85%]
test/test_plugin_sns.py::test_plugin_sns_aws_topic_handling PASSED                                                                               [ 86%]
test/test_plugin_sparkpost.py::test_plugin_sparkpost_urls PASSED                                                                                 [ 86%]
test/test_plugin_sparkpost.py::test_plugin_sparkpost_throttling PASSED                                                                           [ 86%]
test/test_plugin_sparkpost.py::test_plugin_sparkpost_attachments PASSED                                                                          [ 86%]
test/test_plugin_splunk.py::test_plugin_splunk_urls PASSED                                                                                       [ 87%]
test/test_plugin_streamlabs.py::test_plugin_streamlabs_urls PASSED                                                                               [ 87%]
test/test_plugin_synology.py::test_plugin_custom_synology_urls PASSED                                                                            [ 87%]
test/test_plugin_synology.py::test_plugin_synology_edge_cases PASSED                                                                             [ 87%]
test/test_plugin_techululs_push.py::test_plugin_techulus_push_urls PASSED                                                                        [ 87%]
test/test_plugin_telegram.py::test_plugin_telegram_urls PASSED                                                                                   [ 88%]
test/test_plugin_telegram.py::test_plugin_telegram_general PASSED                                                                                [ 88%]
test/test_plugin_telegram.py::test_plugin_telegram_formatting PASSED                                                                             [ 88%]
test/test_plugin_telegram.py::test_plugin_telegram_html_formatting PASSED                                                                        [ 88%]
test/test_plugin_threema.py::test_plugin_threema PASSED                                                                                          [ 88%]
test/test_plugin_threema.py::test_plugin_threema_edge_cases PASSED                                                                               [ 89%]
test/test_plugin_title_maxlen.py::test_plugin_title_maxlen PASSED                                                                                [ 89%]
test/test_plugin_twilio.py::test_plugin_twilio_urls PASSED                                                                                       [ 89%]
test/test_plugin_twilio.py::test_plugin_twilio_auth PASSED                                                                                       [ 89%]
test/test_plugin_twilio.py::test_plugin_twilio_edge_cases PASSED                                                                                 [ 89%]
test/test_plugin_twist.py::test_plugin_twist_urls PASSED                                                                                         [ 90%]
test/test_plugin_twist.py::test_plugin_twist_init PASSED                                                                                         [ 90%]
test/test_plugin_twist.py::test_plugin_twist_auth PASSED                                                                                         [ 90%]
test/test_plugin_twist.py::test_plugin_twist_cache PASSED                                                                                        [ 90%]
test/test_plugin_twist.py::test_plugin_twist_fetch PASSED                                                                                        [ 90%]
test/test_plugin_twitter.py::test_plugin_twitter_urls PASSED                                                                                     [ 91%]
test/test_plugin_twitter.py::test_plugin_twitter_general PASSED                                                                                  [ 91%]
test/test_plugin_twitter.py::test_plugin_twitter_edge_cases PASSED                                                                               [ 91%]
test/test_plugin_twitter.py::test_plugin_twitter_dm_caching PASSED                                                                               [ 91%]
test/test_plugin_twitter.py::test_plugin_twitter_dm_attachments_basic PASSED                                                                     [ 91%]
test/test_plugin_twitter.py::test_plugin_twitter_dm_attachments_message_fails PASSED                                                             [ 92%]
test/test_plugin_twitter.py::test_plugin_twitter_dm_attachments_upload_fails PASSED                                                              [ 92%]
test/test_plugin_twitter.py::test_plugin_twitter_dm_attachments_invalid_attachment PASSED                                                        [ 92%]
test/test_plugin_twitter.py::test_plugin_twitter_dm_attachments_multiple PASSED                                                                  [ 92%]
test/test_plugin_twitter.py::test_plugin_twitter_dm_attachments_multiple_oserror PASSED                                                          [ 92%]
test/test_plugin_twitter.py::test_plugin_twitter_tweet_attachments_basic PASSED                                                                  [ 93%]
test/test_plugin_twitter.py::test_plugin_twitter_tweet_attachments_more_logging PASSED                                                           [ 93%]
test/test_plugin_twitter.py::test_plugin_twitter_tweet_attachments_bad_message_response PASSED                                                   [ 93%]
test/test_plugin_twitter.py::test_plugin_twitter_tweet_attachments_bad_message_response_unparseable PASSED                                       [ 93%]
test/test_plugin_twitter.py::test_plugin_twitter_tweet_attachments_upload_fails PASSED                                                           [ 94%]
test/test_plugin_twitter.py::test_plugin_twitter_tweet_attachments_invalid_attachment PASSED                                                     [ 94%]
test/test_plugin_twitter.py::test_plugin_twitter_tweet_attachments_multiple_batch PASSED                                                         [ 94%]
test/test_plugin_twitter.py::test_plugin_twitter_tweet_attachments_multiple_nobatch PASSED                                                       [ 94%]
test/test_plugin_twitter.py::test_plugin_twitter_tweet_attachments_multiple_oserror PASSED                                                       [ 94%]
test/test_plugin_voipms.py::test_plugin_voipms PASSED                                                                                            [ 95%]
test/test_plugin_voipms.py::test_plugin_voipms_edge_cases PASSED                                                                                 [ 95%]
test/test_plugin_voipms.py::test_plugin_voipms_non_success_status PASSED                                                                         [ 95%]
test/test_plugin_vonage.py::test_plugin_vonage_urls PASSED                                                                                       [ 95%]
test/test_plugin_vonage.py::test_plugin_vonage_edge_cases PASSED                                                                                 [ 95%]
test/test_plugin_webex_teams.py::test_plugin_webex_teams_urls PASSED                                                                             [ 96%]
test/test_plugin_wecombot.py::test_plugin_wecombot_urls PASSED                                                                                   [ 96%]
test/test_plugin_whatsapp.py::test_plugin_whatsapp_urls PASSED                                                                                   [ 96%]
test/test_plugin_whatsapp.py::test_plugin_whatsapp_auth PASSED                                                                                   [ 96%]
test/test_plugin_whatsapp.py::test_plugin_whatsapp_edge_cases PASSED                                                                             [ 96%]
test/test_plugin_windows.py::test_plugin_windows_mocked PASSED                                                                                   [ 97%]
test/test_plugin_windows.py::test_plugin_windows_native SKIPPED (Requires win32api, win32con, and win32gui)                                      [ 97%]
test/test_plugin_xbmc_kodi.py::test_plugin_xbmc_kodi_urls PASSED                                                                                 [ 97%]
test/test_plugin_zulip.py::test_plugin_zulip_urls PASSED                                                                                         [ 97%]
test/test_plugin_zulip.py::test_plugin_zulip_edge_cases PASSED                                                                                   [ 97%]
test/test_rest_plugins.py::test_notify_overflow_truncate_with_amalgamation PASSED                                                                [ 98%]
test/test_rest_plugins.py::test_notify_overflow_truncate_no_amalgamation PASSED                                                                  [ 98%]
test/test_rest_plugins.py::test_notify_overflow_split_with_amalgamation PASSED                                                                   [ 98%]
test/test_rest_plugins.py::test_notify_overflow_split_with_amalgamation_force_title_always PASSED                                                [ 98%]
test/test_rest_plugins.py::test_notify_overflow_split_with_amalgamation_force_title_once PASSED                                                  [ 98%]
test/test_rest_plugins.py::test_notify_overflow_split_no_amalgamation PASSED                                                                     [ 99%]
test/test_rest_plugins.py::test_notify_overflow_split_no_amalgamation_force_title_always PASSED                                                  [ 99%]
test/test_rest_plugins.py::test_notify_overflow_split_no_amalgamation_force_title_once PASSED                                                    [ 99%]
test/test_rest_plugins.py::test_notify_markdown_general PASSED                                                                                   [ 99%]
test/test_rest_plugins.py::test_notify_emoji_general PASSED                                                                                      [100%]
=========================================================== 437 passed, 50 skipped in 43.87s ===========================================================

@caronc
Copy link
Owner

caronc commented May 31, 2024

Hmm, it seems to be falling as a result of a put in the Matrix code introduced in #1128.

It seems it's tests are failing for some reason for this version of Python. Very random 🤔

@caronc
Copy link
Owner

caronc commented Jun 2, 2024

I think we got it; let me know if things still work for you; we can likely preform a merge at this point.

@caronc caronc changed the title Add SFR Support Add Société Française du Radiotéléphone (SFR) Support Jun 2, 2024
@Anghille
Copy link
Contributor Author

Anghille commented Jun 3, 2024

I have pulled the changes.
Tests passes successfully and manual tests (sending messages using bin/apprise -b 'my text here) works successfully in various scenarios. :

  1. bin/apprise -b 'testing with ça UNICODE!? characters +/-' -vv -D 'sfr://<my-service-id>:<my-password>@<space-id>/<my-phone-number>' PASS
  2. bin/apprise -b 'Other test with ça UNICODE!? characters +/-' -vv -D 'sfr://<my-service-id>:<my-password>@<space-id>/<my-phone-number>?media=SMSUnicodeLong&from=TEST_OADC' PASS ✅ (send an SMS with the name TEST_OADC instead of the traditionnal XXXXX - where X is a set of seamingly random numbers - traditionally 5 in France - which tells the user its coming from an automated solution)
  3. bin/apprise -b 'Other test with ça UNICODE!? characters +/-' -vv -D 'sfr://<my-service-id>:<my-password>@<space-id>/?to=<my-phone-number>,<an-other-phone-from-friend>?media=SMSUnicodeLong&from=TEST_OADC' PASS
  4. bin/apprise -b 'Other test with ça UNICODE!? characters +/-' -vv -D 'sfr://<my-service-id>:<my-password>@<space-id>/?to=<my-phone-number>,<an-other-phone-from-friend>?media=SMSLong&from=TEST_OADC' PASS ✅ (ç becomes c due to not using Unicode compatible media, as expected)
  5. bin/apprise -b '<lorem ipsum generated code with too many characters for the media type selected>' -vv -D 'sfr://<my-service-id>:<my-password>@<space-id>/<my-phone-number> PASS ✅ (the test "fails" in regards to the SMS length -> Return "SMS_TOO_LONG" error as expected since SMS media only accept a max set of characters AT MOST.)
  6. bin/apprise -b 'an other test' -vv -D 'sfr://<my-service-id>:<my-password>@<space-id>/t?to=<not-correct-phone-format>,<my-phone-number> PASS ✅ (the test "fails" with an invalid number dropped for the first phone number, and correctly sends the second message, as expected)
  7. bin/apprise -b 'an other test' -vv -D 'sfr://<my-service-id>:<my-password>@<space-id>/t?to=<my-phone-number>&lang=en_US PASS ✅ (the test "fails" with an LOCAL_UNKOWN since SFR expect specific LOCAL lang setup, as expected)
  8. bin/apprise -b 'an other test' -vv -D 'sfr://<my-service-id>:<my-password>@<space-id>/t?to=<my-phone-number>&lang=fr_FR&timeout=30&voice=claire08k PASS

I think we can say it works :)

@caronc caronc merged commit 3896b4a into caronc:master Jun 9, 2024
13 checks passed
@caronc
Copy link
Owner

caronc commented Jun 9, 2024

Merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants