summaryrefslogtreecommitdiff
path: root/python/arti_rpc_tests
Commit message (Collapse)AuthorAgeFilesLines
* arti_rpc_tests: use Iterator, not GeneratorNick Mathewson2024-10-281-2/+2
| | | | Generator is more abstract, and expects a possible return or send type.
* arti_rpc_tests: Fix a type errorNick Mathewson2024-10-242-2/+11
| | | | mypy rightly complained that our context.arti_process could be None.
* python: Remove a spurious blank line.Nick Mathewson2024-10-241-1/+0
|
* python: Fix warnings about unused variables and modules.Nick Mathewson2024-10-243-8/+8
|
* Add a pyproject.toml for arti_rpc_testsNick Mathewson2024-10-241-0/+23
|
* Run "black" to reformat all our pythonNick Mathewson2024-10-244-31/+29
| | | | | | | | | | | | | | | | | "Black" is an "opinionated" python formatter, whose opinionatedness is somewhat in the spirit of rustfmt. This MR runs black with default settings on all of our python code in Arti. It was produced by the following commands ``` # Everything in python/ black python/ # Everything with a .py extension fd '.py$' -X black # Everything with a python shebang. git grep -l '#! */usr/bin/env *python' | xargs black ```
* rpc: Tweak release_owned to give an error on second removal of "connection".Nick Mathewson2024-10-231-0/+10
|
* python: Use logging to report nonfatal errors.Nick Mathewson2024-10-231-0/+3
|
* rpc: Add test for releasing the session object.Nick Mathewson2024-10-231-0/+14
|
* rpc: Add support for dropping the special "connection" object ID.Nick Mathewson2024-10-231-0/+21
|
* python: Automatically release RPC objects on __del__Nick Mathewson2024-10-231-0/+1
|
* python: Add tests for rpc:release.Nick Mathewson2024-10-232-0/+49
|
* python: add tests for opening streams via RPC.Nick Mathewson2024-10-212-0/+35
|
* python: Expose RPC status code from errors.Nick Mathewson2024-10-212-2/+5
|
* python: add more tests for the rpc code.Nick Mathewson2024-10-211-1/+38
|
* python: Move meta.features test to new module.Nick Mathewson2024-10-213-47/+50
|
* python: Provide a sensible way to set metaparams in requestsNick Mathewson2024-10-211-0/+14
|
* python: Decode JSON in rpc responses more aggressivelyNick Mathewson2024-10-211-6/+3
| | | | | | | | | | | This tweaks the APIs to return a dict in cases where we know that we are getting a result, and to return an ArtiRpcResponse in cases where we don't know what kind of response we're getting. It also expands our Error objects to support decoding. Rationale: everybody who is using this libaray will want to decode the json objects that they receive. By doing it in the library, we can save them some annoyance.
* python: Allow execute methods to accept dictsNick Mathewson2024-10-211-2/+1
| | | | | Previously, they only took strings, which sometimes required the caller to use json.
* rpc: List missing required features in error dataNick Mathewson2024-10-171-0/+41
| | | | | | | | | | Our spec says that when the RPC client has said "I require you to have feature X" and we don't have it, we need to include the feature(s) we don't have in an `rpc:unsupported_features` field of our error. Also, add an integration test for this behavior. Closes #1662
* rpc-tests: Resolve unused variable/import warnings.Nick Mathewson2024-10-103-6/+2
|
* rpc-tests: Avoid 'import *'Nick Mathewson2024-10-101-1/+1
|
* rpc-tests: Reformat using "black".Nick Mathewson2024-10-106-10/+20
| | | | | (This is all on the theory that any formatting standard is better than none.)
* rpc-tests: Use argparse to parse cli.Nick Mathewson2024-10-102-9/+32
| | | | | | Right now, we only support two things in the CLI: overriding ARTI_RPC_TEST_DIR, and passing additional arguments to arti_rpc_tests.
* rpc-tests: Rename setup.py to context.pyNick Mathewson2024-10-103-7/+7
|
* rpc-tests: Use a decorator instead of a magic function nameNick Mathewson2024-10-103-4/+16
|
* rpc-tests: Use __init__ instead of weird staticmethod.Nick Mathewson2024-10-102-6/+2
|
* rpc-tests: Format config file correctly for Toml.Nick Mathewson2024-10-101-16/+16
| | | | | | | | | | | | We use the `tomli_w` package to generate reasonable toml output, instead of trying to use `str.format`. Without this, there's not an easy way to tell string.Formatter to convert Path('/abc/"def"') to `"abc/\"def\""`. Something like this would be necessary even if we weren't using Path, since the toml rules for sring encoding aren't the same as produced by Python's repr(), which we were using before.
* rpc-integration: Use Path instead of str.Nick Mathewson2024-10-102-12/+15
|
* Start a set of integration tests in pythonNick Mathewson2024-10-108-0/+479
These tests are loosely modeled after stem's test suite for Tor and the Tor control port. They're meant to exercise Arti, Arti RPC, and the Arti RPC client library. (For now, they exercise very little.)