我已经运行了这里可用的 Sonos Self-Test Suite ,除了这个错误之外,一切都通过了,我不知道为什么:
Test case: PollingIntervalTest test_getlastupdate_no_change
Instance messages: could not convert string to float
...more output...
2016-02-23 09:43:40,834 [STOP] SONOS.sonos.workflow.fixture.PollingIntervalTest - could not convert string to float:
2016-02-23 09:43:40,834 [STOP] SONOS.sonos.workflow.fixture.PollingIntervalTest - 1212827 PollingIntervalTest test_getlastupdate_no_change
2016-02-23 09:43:40,836 [DEBUG] SONOS.sonos.workflow.fixture.PollingIntervalTest - [('../../sonos-1.1.0.dev_r208947-py2.7.egg/sonos/workflow/fixture.py', 2494, '_run_test_iteration', 'testMethod()'), ('/Users/rob/Dropbox/dev/projects/composed/sonos_downloads/sonos-selftest/smapi/content_workflow/getlastupdate.py', 40, 'test_getlastupdate_no_change', 'poll_interval = self.smapiservice.get_polling_interval()'), ('../../sonos-1.1.0.dev_r208947-py2.7.egg/sonos/smapi/smapiservice.py', 374, 'get_polling_interval', "pollinterval = self.config.getfloat('Polling Interval', 'interval')")]
2016-02-23 09:43:40,836 [INFO] SONOS.sonos.workflow.fixture.PollingIntervalTest - - - - - - - - - - - - - - - - - - - - - - - - - -
2016-02-23 09:43:40,836 [INFO] SONOS.sonos.workflow.result - End *test case* test_getlastupdate_no_change at Tuesday, February 23, 2016 09:43 AM
这是我的服务返回的内容:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.sonos.com/Services/1.1">
<soap:Body>
<tns:getLastUpdateResponse>
<getLastUpdateResult>
<catalog>2016-02-18 11:52:30</catalog>
<favorites>Rob-2016-02-18 12:01:00</favorites>
<pollInterval>30</pollInterval>
</getLastUpdateResult>
</tns:getLastUpdateResponse>
</soap:Body>
</soap:Envelope>
它似乎与Sonos API 文档中的示例响应几乎相同。您可以看到 pollInterval 没有在 SOAP XML 中指定类型信息,所以我正在努力了解这个错误是如何由于我正在做的事情引起的。
我做错了什么,或者这可能是测试套件本身的问题吗?