Skip to content

Commit 1c4ce6b

Browse files
committed
fix: Rename
1 parent fddc183 commit 1c4ce6b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/c2pa/c2pa.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1723,7 +1723,7 @@ def get_active_manifest(self) -> Optional[dict]:
17231723
except C2paError.ManifestNotFound:
17241724
return None
17251725

1726-
def get_manifest_from_label(self, label: str) -> Optional[dict]:
1726+
def get_manifest(self, label: str) -> Optional[dict]:
17271727
"""Get a specific manifest from the manifest store by its label.
17281728
17291729
This method retrieves the manifest JSON and extracts the manifest

tests/test_unit_tests.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ def test_get_active_manifest(self):
7373
expected_label = "contentauth:urn:uuid:c85a2b90-f1a0-4aa4-b17f-f938b475804e"
7474
self.assertEqual(active_manifest["label"], expected_label)
7575

76-
def test_get_manifest_from_label(self):
76+
def test_get_manifest(self):
7777
with open(self.testPath, "rb") as file:
7878
reader = Reader("image/jpeg", file)
7979

8080
# Test getting manifest by the specific label
8181
label = "contentauth:urn:uuid:c85a2b90-f1a0-4aa4-b17f-f938b475804e"
82-
manifest = reader.get_manifest_from_label(label)
82+
manifest = reader.get_manifest(label)
8383
self.assertEqual(manifest["label"], label)
8484

8585
# It should be the active manifest too, so cross-check
@@ -92,7 +92,7 @@ def test_stream_get_non_active_manifest_by_label(self):
9292
reader = Reader("video/mp4", file)
9393

9494
non_active_label = "urn:uuid:54281c07-ad34-430e-bea5-112a18facf0b"
95-
non_active_manifest = reader.get_manifest_from_label(non_active_label)
95+
non_active_manifest = reader.get_manifest(non_active_label)
9696
self.assertEqual(non_active_manifest["label"], non_active_label)
9797

9898
# Verify it's not the active manifest
@@ -109,7 +109,7 @@ def test_stream_get_non_active_manifest_by_label_not_found(self):
109109
# Try to get a manifest with a label that clearly doesn't exist...
110110
non_existing_label = "urn:uuid:clearly-not-existing"
111111
with self.assertRaises(KeyError):
112-
reader.get_manifest_from_label(non_existing_label)
112+
reader.get_manifest(non_existing_label)
113113

114114
def test_stream_read_get_validation_state(self):
115115
with open(self.testPath, "rb") as file:

0 commit comments

Comments
 (0)