Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
parisk committed Oct 28, 2020
1 parent c848d1c commit cdfa28d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions sec.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def _sanitize_environment_variable_name(name: str) -> str:
sanitized_name = uppercase_name.replace("/", "_")
return sanitized_name


def _load_secret_from_path(path: str) -> Optional[str]:
if not os.path.exists(path):
return None
Expand Down
4 changes: 1 addition & 3 deletions test_sec.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ def test_load_from_environment_variable():
environment_variable_name = "DATABASE_URL"
secret = "postgres://USER:PASSWORD@HOST:PORT/NAME"

assert sec._load_from_environment_variable(
environment_variable_name
) is None
assert sec._load_from_environment_variable(environment_variable_name) is None

os.environ[environment_variable_name] = secret
assert sec._load_from_environment_variable("DATABASE_URL") == secret
Expand Down

0 comments on commit cdfa28d

Please sign in to comment.