File: oauthlib-3.3.0.patch

package info (click to toggle)
python-requests-oauthlib 2.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 516 kB
  • sloc: python: 2,169; makefile: 157
file content (33 lines) | stat: -rw-r--r-- 1,411 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From: Jonathan Huot <jonathan.huot@gmail.com>
Date: Thu, 12 Jun 2025 20:06:32 +0200
Subject: Updated tests to support 3.3.0/changes rel. to expires_at

Origin: upstream, https://github.com/requests/requests-oauthlib/pull/559/commits/b1dd93c5d024500b6236dea06734d6e6482c3565
Bug-Debian: https://bugs.debian.org/1114330
Last-Update: 2025-10-13
---
 tests/test_compliance_fixes.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test_compliance_fixes.py b/tests/test_compliance_fixes.py
index 5c90d52..74bf498 100644
--- a/tests/test_compliance_fixes.py
+++ b/tests/test_compliance_fixes.py
@@ -119,7 +119,7 @@ class MailChimpComplianceFixTest(TestCase):
             authorization_response="https://i.b/?code=hello",
         )
         # Times should be close
-        approx_expires_at = time.time() + 3600
+        approx_expires_at = round(time.time()) + 3600
         actual_expires_at = token.pop("expires_at")
         self.assertAlmostEqual(actual_expires_at, approx_expires_at, places=2)
 
@@ -293,7 +293,7 @@ class PlentymarketsComplianceFixTest(TestCase):
             authorization_response="https://i.b/?code=hello",
         )
 
-        approx_expires_at = time.time() + 86400
+        approx_expires_at = round(time.time()) + 86400
         actual_expires_at = token.pop("expires_at")
         self.assertAlmostEqual(actual_expires_at, approx_expires_at, places=2)