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'
         }
     })
예제 #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",
             }
         },
     )