wagapi 0.2.1__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {wagapi-0.2.1 → wagapi-0.2.2}/PKG-INFO +1 -1
  2. {wagapi-0.2.1 → wagapi-0.2.2}/pyproject.toml +1 -1
  3. {wagapi-0.2.1 → wagapi-0.2.2}/tests/test_commands.py +22 -0
  4. wagapi-0.2.2/wagapi/__init__.py +1 -0
  5. {wagapi-0.2.1 → wagapi-0.2.2}/wagapi/commands/pages.py +1 -1
  6. wagapi-0.2.1/wagapi/__init__.py +0 -1
  7. {wagapi-0.2.1 → wagapi-0.2.2}/.github/workflows/publish.yml +0 -0
  8. {wagapi-0.2.1 → wagapi-0.2.2}/.gitignore +0 -0
  9. {wagapi-0.2.1 → wagapi-0.2.2}/README.md +0 -0
  10. {wagapi-0.2.1 → wagapi-0.2.2}/tests/__init__.py +0 -0
  11. {wagapi-0.2.1 → wagapi-0.2.2}/tests/conftest.py +0 -0
  12. {wagapi-0.2.1 → wagapi-0.2.2}/tests/test_client.py +0 -0
  13. {wagapi-0.2.1 → wagapi-0.2.2}/tests/test_config.py +0 -0
  14. {wagapi-0.2.1 → wagapi-0.2.2}/tests/test_markdown.py +0 -0
  15. {wagapi-0.2.1 → wagapi-0.2.2}/wagapi/__main__.py +0 -0
  16. {wagapi-0.2.1 → wagapi-0.2.2}/wagapi/cli.py +0 -0
  17. {wagapi-0.2.1 → wagapi-0.2.2}/wagapi/client.py +0 -0
  18. {wagapi-0.2.1 → wagapi-0.2.2}/wagapi/commands/__init__.py +0 -0
  19. {wagapi-0.2.1 → wagapi-0.2.2}/wagapi/commands/images.py +0 -0
  20. {wagapi-0.2.1 → wagapi-0.2.2}/wagapi/commands/init.py +0 -0
  21. {wagapi-0.2.1 → wagapi-0.2.2}/wagapi/commands/schema.py +0 -0
  22. {wagapi-0.2.1 → wagapi-0.2.2}/wagapi/config.py +0 -0
  23. {wagapi-0.2.1 → wagapi-0.2.2}/wagapi/exceptions.py +0 -0
  24. {wagapi-0.2.1 → wagapi-0.2.2}/wagapi/formatting/__init__.py +0 -0
  25. {wagapi-0.2.1 → wagapi-0.2.2}/wagapi/formatting/markdown.py +0 -0
  26. {wagapi-0.2.1 → wagapi-0.2.2}/wagapi/formatting/output.py +0 -0
  27. {wagapi-0.2.1 → wagapi-0.2.2}/wagapi/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wagapi
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: CLI client for the Wagtail Write API, optimised for LLM orchestration
5
5
  Project-URL: Repository, https://github.com/tomdyson/wagapi
6
6
  Project-URL: Issues, https://github.com/tomdyson/wagapi/issues
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "wagapi"
7
- version = "0.2.1"
7
+ version = "0.2.2"
8
8
  description = "CLI client for the Wagtail Write API, optimised for LLM orchestration"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -97,6 +97,28 @@ def test_pages_list(runner):
97
97
  assert "Hello" in result.output
98
98
 
99
99
 
100
+ @respx.mock
101
+ def test_pages_list_with_parent(runner):
102
+ data = {
103
+ "meta": {"total_count": 1},
104
+ "items": [
105
+ {
106
+ "id": 42,
107
+ "title": "Hello",
108
+ "meta": {"type": "blog.BlogPage", "live": True},
109
+ }
110
+ ],
111
+ }
112
+ route = respx.get(f"{BASE_URL}/pages/").mock(
113
+ return_value=Response(200, json=data)
114
+ )
115
+ with mock.patch.dict("os.environ", ENV):
116
+ result = runner.invoke(cli, ["pages", "list", "--parent", "5"])
117
+ assert result.exit_code == 0
118
+ assert route.called
119
+ assert "parent" in str(route.calls[0].request.url)
120
+
121
+
100
122
  @respx.mock
101
123
  def test_pages_get(runner):
102
124
  data = {
@@ -0,0 +1 @@
1
+ __version__ = "0.2.2"
@@ -91,7 +91,7 @@ def list_pages(
91
91
  if page_type:
92
92
  params["type"] = page_type
93
93
  if parent:
94
- params["child_of"] = parent
94
+ params["parent"] = parent
95
95
  if descendant_of:
96
96
  params["descendant_of"] = descendant_of
97
97
  if status:
@@ -1 +0,0 @@
1
- __version__ = "0.2.1"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes