Exemple #1
0
def test_create_sas():
    security_client = SymmetricKeySecurityClient(
        fake_registration_id, fake_symmetric_key, fake_id_scope
    )
    sas_value = security_client.get_current_sas_token()
    assert key_name in sas_value
    assert fake_registration_id in sas_value
    assert fake_id_scope in sas_value
 def op(self, mocker):
     security_client = SymmetricKeySecurityClient(
         provisioning_host="hogwarts.com",
         registration_id="registered_remembrall",
         id_scope="weasley_wizard_wheezes",
         symmetric_key="Zm9vYmFy",
     )
     security_client.get_current_sas_token = mocker.MagicMock()
     return pipeline_ops_provisioning.SetSymmetricKeySecurityClientOperation(
         security_client=security_client, callback=mocker.MagicMock())