Skip to content

fix one of tests

fix one of tests #134

GitHub Actions / Test Results failed Jan 14, 2025 in 0s

1 fail, 12 skipped, 1β€ˆ105 pass in 1m 53s

1β€ˆ118 tests  +33   1β€ˆ105 βœ… +24   1m 53s ⏱️ + 1m 18s
β€‡β€ˆβ€‡β€‡4 suites + 2β€‚β€ƒβ€ƒβ€‡β€ˆβ€‡12 πŸ’€ + 8 
β€‡β€ˆβ€‡β€‡4 files   + 2β€‚β€ƒβ€ƒβ€‡β€ˆβ€‡β€‡1 ❌ + 1 

Results for commit 1a49a8f. ± Comparison against earlier commit 30fcd25.

Annotations

Check warning on line 0 in tests.sandbox_tests.test_sandbox.SandboxTestCase

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_5_activate_account (tests.sandbox_tests.test_sandbox.SandboxTestCase) failed

sandbox_test_results.xml [took 0s]
Raw output
pytezos.rpc.node.RpcError: ({'id': 'proto.021-PsQuebec.validate.operation.invalid_activation',
  'kind': 'permanent',
  'pkh': 'tz1W86h1XuWy6awbNUTRUgs6nk8q5vqXQwgk'},)
self = <test_sandbox.SandboxTestCase testMethod=test_5_activate_account>

    def test_5_activate_account(self) -> None:
        client = self.get_client(key=sandbox_commitment)
>       client.activate_account().autofill().sign().inject()

tests/sandbox_tests/test_sandbox.py:36: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/pytezos/jupyter.py:90: in __call__
    return method(self.obj, *args, **kwargs)
src/pytezos/operation/group.py:269: in autofill
    opg_with_metadata = opg.run()
src/pytezos/jupyter.py:90: in __call__
    return method(self.obj, *args, **kwargs)
src/pytezos/operation/group.py:198: in run
    return self.shell.blocks[block_id].helpers.scripts.run_operation.post(
src/pytezos/jupyter.py:90: in __call__
    return method(self.obj, *args, **kwargs)
src/pytezos/rpc/helpers.py:320: in post
    return self._post(json=operation)
src/pytezos/rpc/query.py:131: in _post
    return self.node.post(
src/pytezos/rpc/node.py:143: in post
    response = self.request(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytezos.rpc.node.RpcNode object at 0x7f8df88c5d30>

Node address
http://localhost:8732
method = 'POST', path = '/chains/main/blocks/head/helpers/scripts/run_operation'
kwargs = {'json': {'chain_id': 'NetXdQprcVkpaWU', 'operation': {'branch': 'BLBBp9J33cvE4xkEv8DhqawutaDnoyXe3FDcFuw9GfBvENNrasF'...: 'sigUHx32f9wesZ1n2BWpixXz4AQaZggEtchaQNHYGRCoWNAXx45WGW2ua3apUUUAGMLPwAU41QoaFCzVSL61VaessLg4YbbP'}}, 'params': None}
res = <Response [500]>

    def request(self, method: str, path: str, **kwargs) -> requests.Response:
        """Perform HTTP request to node.
    
        :param method: one of GET/POST/PUT/DELETE
        :param path: path to endpoint
        :param kwargs: requests.request arguments
        :raises RpcError: node has returned an error
        :returns: node response
        """
        logger.debug('>>>>> %s %s\n%s', method, path, json.dumps(kwargs, indent=4))
        res = requests.request(
            method=method,
            url=_urljoin(self.uri[0], path),
            headers={'content-type': 'application/json', 'user-agent': 'PyTezos', **self.headers},
            timeout=kwargs.pop('timeout', None) or 60,
            **kwargs,
        )
        if res.status_code == 401:
            logger.debug('<<<<< %s\n%s', res.status_code, res.text)
            raise RpcError(f'Unauthorized: {path}')
        if res.status_code == 404:
            logger.debug('<<<<< %s\n%s', res.status_code, res.text)
            raise RpcError(f'Not found: {path}')
        if res.status_code != 200:
            logger.debug('<<<<< %s\n%s', res.status_code, pformat(res.text, indent=4))
>           raise RpcError.from_response(res)
E           pytezos.rpc.node.RpcError: ({'id': 'proto.021-PsQuebec.validate.operation.invalid_activation',
E             'kind': 'permanent',
E             'pkh': 'tz1W86h1XuWy6awbNUTRUgs6nk8q5vqXQwgk'},)

src/pytezos/rpc/node.py:118: RpcError