This project uses:
Atlassian python API to interact with the running instance Typer to provide front-end for command-line Toml for config files
- pytest as the test suite
- faker for generating the data
- pytest-cov for coverage (runnable through
coverage.sh
in this repo)
The tests are organized by two marks – online
and offline
. offline
tests cover mostly confluence_poster
internal parameter validation.
online
tests require a running instance of confluence to be tested against. The settings for those tests should be specified in local_config.toml
and local_config_other_user.toml
. Two files are necessary to simulate scenarios when multiple users write to pages and the script alerts about it. At the time of writing the maintainer of this repo has an open-source license from Atlassian, so if you want to test something but are unable to – do feel free to reach out.
Tests use record_pages
fixture that captures all pages created during the test and destroys them afterwards. It is populated (somewhat unintuitively) through inspect, but this beats repeating the fixture over and over for every test.
tests/test_post_one_page.py
has the test for minor_edit
parameter marked as "skipped". This is because apparently Atlassian stopped exposing this parameter in the history. I do not receive notifications in my local environments when this flag is set, so the option (at the time of writing) works.
The documentation is generated by mkdocs.py
which parses the docs autogenerated by typer-cli
and renders the Jinja2 template from docs folder.