Exemplo n.º 1
0
def test_properties_are_not_settable():
    security_client = SymmetricKeySecurityClient(
        fake_registration_id, fake_symmetric_key, fake_id_scope
    )
    with pytest.raises(AttributeError, match="can't set attribute"):
        security_client.registration_id = "MyNimbus2000"
        security_client.id_scope = "WhompingWillow"
 def test_properties_are_not_settable_after_instantiation_security_client(
         self):
     security_client = SymmetricKeySecurityClient(fake_provisioning_host,
                                                  fake_registration_id,
                                                  fake_id_scope,
                                                  fake_symmetric_key)
     with pytest.raises(AttributeError, match="can't set attribute"):
         security_client.registration_id = "MyNimbus2000"
         security_client.id_scope = "WhompingWillow"
         security_client.provisioning_host = "hogwarts.com"