Mise à jour de GitLab prévue ce dimanche 25 octobre 2020 à partir de 9h00 CEST | GitLab upgrade planned this Sunday 25th of October 2020 from 9:00 AM CEST

Commit 721fba91 authored by Moul's avatar Moul
parent ff6dbbe0
Pipeline #5914 failed with stages
in 3 minutes and 10 seconds
from duniterpy.key import SigningKey
import getpass
import os
from pathlib import Path
if "XDG_CONFIG_HOME" in os.environ:
home_path = os.environ["XDG_CONFIG_HOME"]
home_path = Path(os.environ["XDG_CONFIG_HOME"])
elif "HOME" in os.environ:
home_path = os.environ["HOME"]
home_path = Path(os.environ["HOME"])
elif "APPDATA" in os.environ:
home_path = os.environ["APPDATA"]
home_path = Path(os.environ["APPDATA"])
else:
home_path = os.path.dirname(__file__)
home_path = Path(__file__).parent
# CONFIG #######################################
# WARNING : Hide this file in a safe and secure place
# If one day you forget your credentials,
# you'll have to use one of your private keys instead
PRIVATE_KEYS_FILE_PATH = os.path.join(home_path, ".duniter_account_private_keys.txt")
PRIVATE_KEYS_FILE_PATH = Path(home_path, ".duniter_account_private_keys.txt")
################################################
......
from duniterpy.key import SigningKey
import getpass
import os
from pathlib import Path
if "XDG_CONFIG_HOME" in os.environ:
home_path = os.environ["XDG_CONFIG_HOME"]
home_path = Path(os.environ["XDG_CONFIG_HOME"])
elif "HOME" in os.environ:
home_path = os.environ["HOME"]
home_path = Path(os.environ["HOME"])
elif "APPDATA" in os.environ:
home_path = os.environ["APPDATA"]
home_path = Path(os.environ["APPDATA"])
else:
home_path = os.path.dirname(__file__)
home_path = Path(__file__).parent
# CONFIG #######################################
# WARNING : Hide this file in a safe and secure place
# If one day you forget your credentials,
# you'll have to use one of your private keys instead
PRIVATE_KEY_FILE_PATH = os.path.join(home_path, ".duniter_account_ewif_v1.duniterkey")
PRIVATE_KEY_FILE_PATH = Path(home_path, ".duniter_account_ewif_v1.duniterkey")
################################################
......
from duniterpy.key import SigningKey
import getpass
import os
from pathlib import Path
if "XDG_CONFIG_HOME" in os.environ:
home_path = os.environ["XDG_CONFIG_HOME"]
home_path = Path(os.environ["XDG_CONFIG_HOME"])
elif "HOME" in os.environ:
home_path = os.environ["HOME"]
home_path = Path(os.environ["HOME"])
elif "APPDATA" in os.environ:
home_path = os.environ["APPDATA"]
home_path = Path(os.environ["APPDATA"])
else:
home_path = os.path.dirname(__file__)
home_path = Path(__file__).parent
# CONFIG #######################################
# WARNING : Hide this file in a safe and secure place
# If one day you forget your credentials,
# you'll have to use one of your private keys instead
PRIVATE_KEY_FILE_PATH = os.path.join(home_path, ".duniter_account_pubsec_v1.duniterkey")
PRIVATE_KEY_FILE_PATH = Path(home_path, ".duniter_account_pubsec_v1.duniterkey")
################################################
......
from duniterpy.key import SigningKey
import getpass
import os
from pathlib import Path
if "XDG_CONFIG_HOME" in os.environ:
home_path = os.environ["XDG_CONFIG_HOME"]
home_path = Path(os.environ["XDG_CONFIG_HOME"])
elif "HOME" in os.environ:
home_path = os.environ["HOME"]
home_path = Path(os.environ["HOME"])
elif "APPDATA" in os.environ:
home_path = os.environ["APPDATA"]
home_path = Path(os.environ["APPDATA"])
else:
home_path = os.path.dirname(__file__)
home_path = Path(__file__).parent
# CONFIG #######################################
# WARNING : Hide this file in a safe and secure place
# If one day you forget your credentials,
# you'll have to use one of your private keys instead
PRIVATE_KEY_FILE_PATH = os.path.join(home_path, ".duniter_account_wif_v1.duniterkey")
PRIVATE_KEY_FILE_PATH = Path(home_path, ".duniter_account_wif_v1.duniterkey")
################################################
......
import os
from pathlib import Path
from duniterpy.key import VerifyingKey, SigningKey, PublicKey
from duniterpy.key.scrypt_params import ScryptParams
import unittest
TEST_FILE_PATH = "/tmp/test_file.txt"
TEST_FILE_PATH = Path("/tmp/test_file.txt")
class TestSigningKey(unittest.TestCase):
......@@ -12,8 +12,8 @@ class TestSigningKey(unittest.TestCase):
super(TestSigningKey, self)
# remove test file from disk
if os.path.exists(TEST_FILE_PATH):
os.unlink(TEST_FILE_PATH)
if TEST_FILE_PATH.exists():
TEST_FILE_PATH.unlink()
def test_decrypt_seal(self):
sign_key = SigningKey.from_credentials("alice", "password", ScryptParams())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment