Skip to content

Commit f499a61

Browse files
committed
Add oid to PublicCollOut model
1 parent 23b3f8f commit f499a61

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

backend/btrixcloud/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,6 +1299,7 @@ class PublicCollOut(BaseMongoModel):
12991299
"""Collection output model with annotations."""
13001300

13011301
name: str
1302+
oid: UUID
13021303
description: Optional[str] = None
13031304
caption: Optional[str] = None
13041305

backend/test/test_collections.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
UPDATED_CAPTION = "Updated caption"
1818

1919
NON_PUBLIC_COLL_FIELDS = (
20-
"oid",
2120
"modified",
2221
"crawlCount",
2322
"pageCount",
@@ -877,6 +876,7 @@ def test_list_public_collections(
877876
assert len(collections) == 2
878877
for collection in collections:
879878
assert collection["id"] in (_public_coll_id, _second_public_coll_id)
879+
assert collection["oid"]
880880
assert collection["name"]
881881
assert collection["dateEarliest"]
882882
assert collection["dateLatest"]
@@ -1033,6 +1033,7 @@ def test_list_public_colls_home_url_thumbnail():
10331033

10341034
for coll in collections:
10351035
assert coll["id"] in (_public_coll_id, _second_public_coll_id)
1036+
assert coll["oid"]
10361037
assert coll["name"]
10371038
assert coll["resources"]
10381039
assert coll["dateEarliest"]
@@ -1063,14 +1064,15 @@ def test_list_public_colls_home_url_thumbnail():
10631064
assert coll["description"]
10641065

10651066

1066-
def test_get_public_collection():
1067+
def test_get_public_collection(default_org_id):
10671068
r = requests.get(
10681069
f"{API_PREFIX}/public-collections/{default_org_slug}/collections/{_public_coll_id}"
10691070
)
10701071
assert r.status_code == 200
10711072
coll = r.json()
10721073

10731074
assert coll["id"] == _public_coll_id
1075+
assert coll["oid"] == default_org_id
10741076
assert coll["name"]
10751077
assert coll["resources"]
10761078
assert coll["dateEarliest"]

0 commit comments

Comments
 (0)