File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 78
78
steps :
79
79
- uses : actions/checkout@v4
80
80
81
+ - name : Load repo-defined env vars
82
+ run : |
83
+ grep -vE '^\s*(#|$)' .github/github_env >> $GITHUB_ENV
84
+
81
85
- name : Set up Python ${{ matrix.python-version }}
82
86
uses : actions/setup-python@v5
83
87
with :
Original file line number Diff line number Diff line change @@ -87,5 +87,19 @@ def test_expired_session_is_not_valid(self):
87
87
session .save ()
88
88
self .client .cookies [settings .SESSION_COOKIE_NAME ] = session .session_key
89
89
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
+
91
105
self .assertNotIn ("oauth_token" , self .client .session )
You can’t perform that action at this time.
0 commit comments