Skip to content

Commit f497c16

Browse files
committed
tests: test fernet_key in python
1 parent a453a2a commit f497c16

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.github/workflows/pytest.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
jobs:
1616
tests:
1717
runs-on: ubuntu-latest
18+
environment: release
1819

1920
steps:
2021
- uses: actions/checkout@v4
@@ -31,5 +32,7 @@ jobs:
3132
pip install pytest
3233
3334
- name: Test with pytest
35+
env:
36+
FERNET_KEY: ${{ secrets.FERNET_KEY }}
3437
run: |
3538
pytest tests/

tests/test_auth.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import sys
2+
import os
3+
4+
def test_import():
5+
sys.path.insert(0, ".")
6+
7+
assert "FERNET_KEY" in os.environ
8+
assert len(os.environ["FERNET_KEY"]) == 32

0 commit comments

Comments
 (0)