File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 99
1010from otdf_python .gotdf_python import EncryptionConfig
1111
12- SOME_PLAINTEXT_FILE = Path (__file__ ).parent / "go.mod"
13-
1412
1513def verify_hello ():
1614 from otdf_python .gotdf_python import Hello
@@ -81,6 +79,9 @@ def verify_encrypt_file() -> None:
8179 "The output path should not exist before calling 'EncryptFile()'."
8280 )
8381
82+ SOME_PLAINTEXT_FILE = Path (tmpDir ) / "new-file.txt"
83+ SOME_PLAINTEXT_FILE .write_text ("Hello world" )
84+
8485 outputFilePath = EncryptFile (
8586 inputFilePath = str (SOME_PLAINTEXT_FILE ),
8687 outputFilePath = str (SOME_ENCRYPTED_FILE ),
@@ -91,10 +92,10 @@ def verify_encrypt_file() -> None:
9192 if not SOME_ENCRYPTED_FILE .exists ():
9293 raise ValueError ("The output file does not exist!" )
9394
94- if not (
95- SOME_ENCRYPTED_FILE . stat (). st_size > 2500
96- and is_zipfile ( SOME_ENCRYPTED_FILE )
97- ):
95+ encrypted_file_size = SOME_ENCRYPTED_FILE . stat (). st_size
96+ print ( f"The encrypted file size is { encrypted_file_size } " )
97+
98+ if not ( encrypted_file_size > 1500 and is_zipfile ( SOME_ENCRYPTED_FILE ) ):
9899 raise ValueError ("The output file has unexpected content!" )
99100
100101 # breakpoint()
You can’t perform that action at this time.
0 commit comments