Skip to content

Commit 496ee20

Browse files
committed
fix: Refactor
1 parent 500eb60 commit 496ee20

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/c2pa/c2pa.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ def sign_file(
679679
signer.close()
680680

681681

682-
def sign_file_with_callback_signer(
682+
def sign_file_using_callback_signer(
683683
source_path: Union[str, Path],
684684
dest_path: Union[str, Path],
685685
manifest: str,
@@ -2084,7 +2084,7 @@ def ed25519_sign(data: bytes, private_key: str) -> bytes:
20842084
'read_file',
20852085
'read_ingredient_file',
20862086
'sign_file',
2087-
'sign_file_with_callback_signer',
2087+
'sign_file_using_callback_signer',
20882088
'format_embeddable',
20892089
'ed25519_sign',
20902090
'sdk_version'

tests/test_unit_tests.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import shutil
2626

2727
from c2pa import Builder, C2paError as Error, Reader, C2paSigningAlg as SigningAlg, C2paSignerInfo, Signer, sdk_version
28-
from c2pa.c2pa import Stream, read_ingredient_file, read_file, sign_file, load_settings, create_signer, sign_file_with_callback_signer
28+
from c2pa.c2pa import Stream, read_ingredient_file, read_file, sign_file, load_settings, create_signer, sign_file_using_callback_signer
2929

3030
# Suppress deprecation warnings
3131
warnings.filterwarnings("ignore", category=DeprecationWarning)
@@ -895,8 +895,8 @@ def sign_callback(data: bytes) -> bytes:
895895
# Clean up the temporary directory
896896
shutil.rmtree(temp_dir)
897897

898-
def test_sign_file_with_callback_signer(self):
899-
"""Test signing a file using the sign_file_with_callback_signer function."""
898+
def test_sign_file_using_callback_signer(self):
899+
"""Test signing a file using the sign_file_using_callback_signer function."""
900900
# Create a temporary directory for the test
901901
temp_dir = tempfile.mkdtemp()
902902
try:
@@ -937,10 +937,10 @@ def sign_callback(data: bytes) -> bytes:
937937
)
938938

939939
# Import the new function
940-
from c2pa.c2pa import sign_file_with_callback_signer
940+
from c2pa.c2pa import sign_file_using_callback_signer
941941

942-
# Use the sign_file_with_callback_signer function
943-
manifest_bytes = sign_file_with_callback_signer(
942+
# Use the sign_file_using_callback_signer function
943+
manifest_bytes = sign_file_using_callback_signer(
944944
source_path=self.testPath,
945945
dest_path=output_path,
946946
manifest=self.manifestDefinition,

0 commit comments

Comments
 (0)