moto/tests/test_iot
Ben Dennerley 958e95cf5c
Make IoT certificate ID generation deterministic and prevent duplicate certificates from being created (#3331)
* Make IoT certificate id generation deterministic

Fixes #3321

As per https://stackoverflow.com/questions/55847788/how-does-aws-iot-generate-a-certificate-id,
the IoT certificate ID is the SHA256 fingerprint of the
certificate. Since moto doesn't generate full certificates we will
instead use the SHA256 hash of the passed certificate pem.

* Don't allow duplicate IoT certificates to be created

Fixes #3320

When using boto3, trying to register a certificate that already
exists will throw a ResourceAlreadyExistsException. Moto should
follow the same pattern to allow testing error handling code in
this area.
2020-09-22 10:28:12 +01:00
..
test_iot.py Make IoT certificate ID generation deterministic and prevent duplicate certificates from being created (#3331) 2020-09-22 10:28:12 +01:00
test_server.py Run black on moto & test directories. 2019-10-31 10:36:05 -07:00