fix #2392 Add validation for shadow version,when update_thing_shadow() has called
This commit is contained in:
parent
3a5d857a60
commit
778fc47c21
3 changed files with 17 additions and 0 deletions
|
|
@ -86,6 +86,12 @@ def test_update():
|
|||
payload.should.have.key('version').which.should.equal(2)
|
||||
payload.should.have.key('timestamp')
|
||||
|
||||
raw_payload = b'{"state": {"desired": {"led": "on"}}, "version": 1}'
|
||||
with assert_raises(ClientError) as ex:
|
||||
client.update_thing_shadow(thingName=name, payload=raw_payload)
|
||||
ex.exception.response['ResponseMetadata']['HTTPStatusCode'].should.equal(409)
|
||||
ex.exception.response['Error']['Message'].should.equal('Version conflict')
|
||||
|
||||
|
||||
@mock_iotdata
|
||||
def test_publish():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue