diff --git a/securedrop/tests/functional/test_journalist.py b/securedrop/tests/functional/test_journalist.py index 06a0d660a7..406a24b75d 100644 --- a/securedrop/tests/functional/test_journalist.py +++ b/securedrop/tests/functional/test_journalist.py @@ -100,8 +100,9 @@ def missing_msg_file(self): self._source_logs_out() # Remove the message file from the store - storage_path = Path(self.journalist_app.storage.storage_path) - msg_files = [p for p in storage_path.rglob("*") if p.is_file()] + filesystem_id = self.source_app.crypto_util.hash_codename(self.source_name) + storage_path = Path(self.journalist_app.storage.storage_path) / filesystem_id + msg_files = [p for p in storage_path.glob("*-msg.gpg")] assert len(msg_files) == 1 msg_files[0].unlink()