4

ここで入手できるSonos Self-Test Suite を実行しましたが、この 1 つのエラーを除いてすべて成功しましたが、その理由がわかりません。

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 docs のサンプル レスポンスと実質的に同じようです。SOAP XML で pollInterval に型情報が指定されていないことがわかります。そのため、このエラーが自分のやっていることが原因であることがわかりません。

何か間違ったことをしていますか、それともテスト スイート自体に問題があるのでしょうか?

4

1 に答える 1

0

これは、トークン値内の特殊文字、特に「:」のセルフテストの処理に問題がある可能性があると思います。可能であれば、サンプル応答で指定されているように単純な整数を返して、問題が解決するかどうかを確認してください。

于 2016-04-18T17:48:33.903 に答える