moto/tests/test_iotdata/test_server.py
Toshiya Kawasaki 0de2e55b13 Support iot and iot-data (#1303)
* append appropriate urls when scaffolding

* make dispatch for rest-api

* fix dispatch for rest-json

* fix moto/core/response to obtain path and body parameters

* small fixes

* remove unused import

* fix get_int_param

* Add features of things and thing-types

* fix scaffold

* basic crud of cert

* support basic CRUD of policy

* refactor

* fix formatting of scaffold

* support principal_pocicy

* support thing_principal

* update readme

* escape service to handle service w/ hyphen like iot-data

* escape service w/ hyphen

* fix regexp to extract region from url

* escape service

* Implement basic iota-data feature

* iot-data shadow delta

* update readme

* remove unused import

* remove comment

* fix syntax

* specify region when creating boto3 client for test

* use uuid for seed of generating cert id

* specify region_name to iotdata client in test

* specify region to boto3 client in moto response

* excude iot and iotdata tests on server mode

* fix handling of thingTypeName in describe-thing

* test if server is up for iot
2017-11-10 09:44:02 +00:00

21 lines
471 B
Python

from __future__ import unicode_literals
import sure # noqa
import moto.server as server
from moto import mock_iotdata
'''
Test the different server responses
'''
@mock_iotdata
def test_iotdata_list():
backend = server.create_backend_app("iot-data")
test_client = backend.test_client()
# just making sure that server is up
thing_name = 'nothing'
res = test_client.get('/things/{}/shadow'.format(thing_name))
res.status_code.should.equal(404)