Skip to content

Commit b469d24

Browse files
Explicitly Load Environment Variables (#1016)
* Explicitly load environment variables * Test change * Test change * Test change * Revert pyproject.toml, remove commented code --------- Co-authored-by: brett <brett@qedsystems.ca>
1 parent 03f9b39 commit b469d24

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ jobs:
7878
steps:
7979
- uses: actions/checkout@v4
8080

81+
- name: Load repo-defined env vars
82+
run: |
83+
grep -vE '^\s*(#|$)' .github/github_env >> $GITHUB_ENV
84+
8185
- name: Set up Python ${{ matrix.python-version }}
8286
uses: actions/setup-python@v5
8387
with:

tests/auth/test_token_refresh2.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,19 @@ def test_expired_session_is_not_valid(self):
8787
session.save()
8888
self.client.cookies[settings.SESSION_COOKIE_NAME] = session.session_key
8989

90-
response = self.client.get("/bcap/index.htm", follow=True)
90+
response = self.client.get("/bcap/index.htm", follow=False)
91+
92+
if response.status_code == 404:
93+
response = self.client.get("/bcap/", follow=False)
94+
95+
if response.status_code in (301, 302):
96+
next_url = response.get("Location")
97+
response = self.client.get(next_url, follow=False)
98+
99+
if response.status_code in (301, 302):
100+
next_url = response.get("Location")
101+
102+
if next_url not in ["/bcap/index.htm", "/bcap/", "/bcap"]:
103+
response = self.client.get(next_url, follow=False)
104+
91105
self.assertNotIn("oauth_token", self.client.session)

0 commit comments

Comments
 (0)