File: 0044-missing-Location-header.patch

package info (click to toggle)
pagure 5.14.1%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,008 kB
  • sloc: python: 125,295; javascript: 22,012; makefile: 208; sh: 191
file content (16 lines) | stat: -rw-r--r-- 614 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: Allow missing Location header

Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Forwarded: no

--- a/tests/test_pagure_flask_ui_login.py
+++ b/tests/test_pagure_flask_ui_login.py
@@ -1157,7 +1157,7 @@ class PagureFlaskLogintests(tests.Simple
             # invalid
             output = self.app.get("/settings")
             self.assertTrue(
-                output.headers["Location"] in ("http://localhost/", "/")
+                output.headers.get("Location", "/") in ("http://localhost/", "/")
             )
 
             # After changing the login_time to now, the session should again be