def test_define_peers(self):
     res = define_peers(['peer0'], ['peer0.local-cluster'], 'an-org')
     assert res == ({
         'peer0': {
             'chaincodeQuery': True,
             'endorsingPeer': True,
             'eventSource': True,
             'ledgerQuery': True
         }
     }, {
         'peer0': {
             'url': 'grpc://peer0.local-cluster:7051',
             'eventUrl': 'grpc://peer0.local-cluster:7053'
         }
     })
Exemple #2
0
 def test_define_peers(self):
     res = define_peers(["peer0"], ["peer0.local-cluster"], "an-org")
     assert res == (
         {
             "peer0": {
                 "chaincodeQuery": True,
                 "endorsingPeer": True,
                 "eventSource": True,
                 "ledgerQuery": True,
             }
         },
         {
             "peer0": {
                 "url": "grpc://peer0.local-cluster:7051",
                 "eventUrl": "grpc://peer0.local-cluster:7053",
             }
         },
     )