mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
backups: Add test for adding ssh remotes
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
2 files changed
+113
No files matched your search
@@ -120,6 +120,13 @@ class YAMLFile(object):
|
||||
return os.stat(self.yaml_file).st_size == 0
|
||||
|
||||
|
||||
def random_string(size=8):
|
||||
"""Generate a random alphanumeric string."""
|
||||
chars = (random.SystemRandom().choice(string.ascii_letters)
|
||||
for _ in range(size))
|
||||
return ''.join(chars)
|
||||
|
||||
|
||||
def generate_password(size=32):
|
||||
"""Generate a random password using ascii alphabet and digits."""
|
||||
chars = (random.SystemRandom().choice(string.ascii_letters + string.digits)
|
||||
|
||||
Reference in new issue
Block a user