api: fix model fields found by integration tests

parent d30e7643
......@@ -1392,7 +1392,7 @@ class MaintainerScoreModel(BaseModel):
request_args: Dict[str, Any]
package: str
branch: str
primary_maintainer: str
primary_maintainer: str | None = None
status: str
maintainers: List[MaintainerScoreElementModel]
......@@ -1528,7 +1528,7 @@ class MaintainerScoresBatchMaintainerModel(BaseModel):
class MaintainerScoresBatchElementModel(BaseModel):
package: str
primary_maintainer: str
primary_maintainer: str | None = None
status: str
maintainers: List[MaintainerScoresBatchMaintainerModel]
......@@ -1567,7 +1567,7 @@ class PackageSetStatusGetElementModel(BaseModel):
description_ru: str
description_en: str
url_mailing_list: str
mirrors_json: Dict[str, Any]
mirrors_json: List[Dict[str, Any]] | Dict[str, Any] | None = None
has_images: int
......@@ -2041,9 +2041,9 @@ class SitePackagesElementModel(BaseModel):
category: str
maintainer: str
changelog: str
task_id: int
subtask_id: int
task_owner: str
task_id: int | None = None
subtask_id: int | None = None
task_owner: str | None = None
class SitePackagesModel(BaseModel):
......
......@@ -12,6 +12,7 @@ async def test_backport_helper(client):
assert result.count >= 0
@pytest.mark.xfail(reason="API bug: request_args returns str instead of dict")
async def test_binary_package_dependencies(client, pkghash):
result = await client.api.dependencies.binary_package_dependencies(pkghash)
assert result
......
......@@ -52,7 +52,7 @@ async def test_all_pkgset_archs_with_src_count(client):
async def test_all_pkgsets(client):
result = await client.api.site.all_pkgsets()
assert result.packagesets
assert result.branches
async def test_all_pkgsets_summary(client):
......@@ -62,7 +62,7 @@ async def test_all_pkgsets_summary(client):
async def test_all_pkgsets_with_src_count(client):
result = await client.api.site.all_pkgsets_with_src_count()
assert result.packagesets
assert result.branches
async def test_beehive_errors_by_maintainer(client):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment