- Update to 0.3.0 * Project restructure and test fixes - Bump minimum required python version to 3.7 - Fix compatibility with old Flask versions * fix-ParanoidTests-fail.patch OBS-URL: https://build.opensuse.org/request/show/978799 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:flask/python-Flask-Paranoid?expand=0&rev=7
27 lines
967 B
Diff
27 lines
967 B
Diff
Index: flask-paranoid-0.3.0/tests/test_paranoid.py
|
|
===================================================================
|
|
--- flask-paranoid-0.3.0.orig/tests/test_paranoid.py
|
|
+++ flask-paranoid-0.3.0/tests/test_paranoid.py
|
|
@@ -1,12 +1,21 @@
|
|
import sys
|
|
import unittest
|
|
|
|
+import flask
|
|
from flask import Flask
|
|
from flask_paranoid import Paranoid
|
|
|
|
|
|
class ParanoidTests(unittest.TestCase):
|
|
def _delete_cookie(self, name, httponly=True):
|
|
+ flask_version = flask.__version__.split('.')
|
|
+ if int(flask_version[0]) < 2 or (int(flask_version[0]) == 2 and int(flask_version[1]) < 1):
|
|
+ httponly = False
|
|
+
|
|
+ if (sys.version_info.minor < 8):
|
|
+ return (name + '=; Expires=Thu, 01-Jan-1970 00:00:00 GMT; '
|
|
+ f'Max-Age=0; {"HttpOnly; " if httponly else ""}Path=/')
|
|
+
|
|
return (name + '=; Expires=Thu, 01 Jan 1970 00:00:00 GMT; '
|
|
f'Max-Age=0; {"HttpOnly; " if httponly else ""}Path=/')
|
|
|