From f64a469b8a8aa9319013d6099ad38e7cde495e18 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 17 Nov 2021 15:58:43 -0800 Subject: minimal python test coverage of content_scope fields --- python/tests/api_files.py | 2 ++ python/tests/api_filesets.py | 2 ++ python/tests/api_webcaptures.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/python/tests/api_files.py b/python/tests/api_files.py index 8f9caf3e..cd08eef7 100644 --- a/python/tests/api_files.py +++ b/python/tests/api_files.py @@ -13,6 +13,7 @@ def test_file(api): sha1="027e7ed3ea1a40e92dd2657a1e3c992b5dc45dd2", sha256="f1f4f18a904e76818863ccbc6141fce92b0dcb47b0d6041aec98bc6806e393c3", mimetype="application/pdf", + content_scope="article", urls=[ FileUrl( url="https://web.archive.org/web/12345542/something.com/blah.pdf", @@ -39,6 +40,7 @@ def test_file(api): assert f1.sha1 == f2.sha1 assert f1.sha256 == f2.sha256 assert f1.mimetype == f2.mimetype + assert f1.content_scope == f2.content_scope assert f1.extra == f2.extra assert f1.urls == f2.urls assert f1.release_ids == f2.release_ids diff --git a/python/tests/api_filesets.py b/python/tests/api_filesets.py index d7654eb9..8ab658f5 100644 --- a/python/tests/api_filesets.py +++ b/python/tests/api_filesets.py @@ -34,6 +34,7 @@ def test_fileset(api): FilesetUrl(url="https://humble-host.com/~user123/dataset/", rel="web"), ], release_ids=[r1edit.ident], + content_scope="dataset", extra=dict(t=4, u=9), edit_extra=dict(test_key="filesets rule"), ) @@ -52,6 +53,7 @@ def test_fileset(api): assert fs1.urls == fs2.urls assert fs1.manifest == fs2.manifest assert fs1.release_ids == fs2.release_ids + assert fs1.content_scope == fs2.content_scope assert fs1.extra == fs2.extra # expansion diff --git a/python/tests/api_webcaptures.py b/python/tests/api_webcaptures.py index 76bc68c0..6a477ff2 100644 --- a/python/tests/api_webcaptures.py +++ b/python/tests/api_webcaptures.py @@ -44,6 +44,7 @@ def test_webcapture(api): FileUrl(rel="wayback", url="https://web.archive.org/web/"), ], release_ids=[r1edit.ident], + content_scope="landing-page", extra=dict(c=1, b=2), edit_extra=dict(test_key="webcaptures rule"), ) @@ -69,6 +70,7 @@ def test_webcapture(api): assert wc1.release_ids == wc2.release_ids assert wc1.timestamp == wc2.timestamp assert wc1.original_url == wc2.original_url + assert wc1.content_scope == wc2.content_scope assert wc1.extra == wc2.extra # check release expansion -- cgit v1.2.3