File: test_identity_service_client.py

package info (click to toggle)
python-azure 20251014%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 766,472 kB
  • sloc: python: 6,314,744; ansic: 804; javascript: 287; makefile: 198; sh: 198; xml: 109
file content (24 lines) | stat: -rw-r--r-- 827 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from devtools_testutils import AzureRecordedTestCase, recorded_by_proxy

from azure.confidentialledger.certificate import (
    ConfidentialLedgerCertificateClient,
)

from _shared.testcase import ConfidentialLedgerPreparer


class TestConfidentialLedgerCertificateClient(AzureRecordedTestCase):
    @ConfidentialLedgerPreparer()
    @recorded_by_proxy
    def test_get_ledger_identity(self, **kwargs):
        confidentialledger_id = kwargs.pop("confidentialledger_id")

        client = self.create_client_from_credential(
            ConfidentialLedgerCertificateClient,
            credential=None,
        )

        network_identity = client.get_ledger_identity(ledger_id=confidentialledger_id)

        assert network_identity["ledgerId"] == confidentialledger_id
        assert network_identity["ledgerTlsCertificate"]