Skip to content

Commit cec3c50

Browse files
committed
Improve a test docstring.
1 parent 2e3a710 commit cec3c50

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

tests/tests_integration/test_rclone_encryption.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import textwrap
23

34
from datashuttle.utils import rclone_encryption
45

@@ -8,8 +9,13 @@
89

910

1011
class TestRcloneEncryption(BaseTest):
11-
def test_set_and_remove_password(self, project):
12-
""" """
12+
def test_set_and_remove_rclone_config_encryption(self, project):
13+
"""Test that RClone config encryption is set up and torn down correctly.
14+
15+
First, we generate a mock RClone config file or a mock SSH project.
16+
Then we check datashuttle functions for encryption, decryption and
17+
cleaning up environment variables work as expected.
18+
"""
1319
ssh_test_utils.setup_project_for_ssh(
1420
project,
1521
)
@@ -21,8 +27,6 @@ def test_set_and_remove_password(self, project):
2127
if rclone_config_path.exists():
2228
rclone_config_path.unlink()
2329

24-
import textwrap
25-
2630
config_content = textwrap.dedent(f"""\
2731
[{project.cfg.rclone.get_rclone_config_name()}]
2832
type = sftp
@@ -49,6 +53,7 @@ def test_set_and_remove_password(self, project):
4953

5054
assert "RCLONE_PASSWORD_COMMAND" not in os.environ
5155

56+
# Read the file contents to check it is no longer encrypted.
5257
with open(rclone_config_path, "r", encoding="utf-8") as f:
5358
first_line = f.readline().strip()
5459

0 commit comments

Comments
 (0)