跳转到主要内容

Foneworx XML API库

项目描述

基于Twisted的库,用于与Foneworx.co.za的XML API交互

实现的方法

  • 登录

  • 登出

  • 新消息

  • 删除新消息

  • 发送消息

  • 已发送消息

  • 删除已发送消息

用法

它在Twisted中运行,使用Trial进行单元测试。

$ virtualenv --no-site-packages ve
$ source ve/bin/activate

运行客户端测试,这些测试的响应是模拟的,不需要设置Foneworx账户。

(ve)$ trial tests.client_tests

运行连接测试,这些测试实际上会连接到Foneworx发送和接收短信。运行这些测试将产生费用/短信积分。

(ve)$ MSISDN=+27xxx USERNAME=xxx PASSWORD=xxx trial tests.connection_tests

测试的一部分是一个完整的堆栈:接收、回复、投递报告和删除。

(ve)$ USERNAME=xxx PASSWORD=xxx trial \
> tests.connection_tests.FoneworxConnectionTestCase.test_full_stack
tests.connection_tests
  FoneworxConnectionTestCase
    test_full_stack ... Please send a test SMS to Foneworx in order to fill the inbox.
Checking for new SMSs every 2 seconds
Checking for new SMSs every 2 seconds
Checking for new SMSs every 2 seconds
Checking for new SMSs every 2 seconds
Replying to an SMS received from +27xxxxxxxxx
Waiting until delivered
Not delivered yet: At Network
Not delivered yet: At Network
Not delivered yet: At Network
Delivered!
Deleting the received message
Deleted: Success
Deleting the sent message
Deleted: None
Logging out
Logged out: Success
                                           [OK]

--------------------------------------------------
Ran 1 tests in 51.191s

PASSED (successes=1)

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分发

python-foneworx-0.1.tar.gz (10.4 kB 查看哈希值)

上传时间:

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面