示例#1
0
from pygate_grpc.client import PowerGateClient

client = PowerGateClient("127.0.0.1:5002", False)

build_info = client.build_info()
print(build_info)

user = client.admin.users.create()

user_id = client.user_id(user.token)
print(user_id)
示例#2
0
def test_get_user_id(pygate_client: PowerGateClient):
    user = pygate_client.admin.users.create()

    user_id = pygate_client.user_id(user.token)

    assert user_id == user.id