forked from pool/python-Django
* 32bit.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:django/python-Django?expand=0&rev=59
28 lines
1.0 KiB
Diff
28 lines
1.0 KiB
Diff
From f12162107327b88a2f1faaab15d048e2535ec642 Mon Sep 17 00:00:00 2001
|
|
From: Hasan Ramezani <hasan.r67@gmail.com>
|
|
Date: Wed, 29 Apr 2020 23:22:41 +0200
|
|
Subject: [PATCH] Fixed #31521 -- Skipped test_parsing_rfc850 test on 32-bit
|
|
systems.
|
|
|
|
---
|
|
tests/utils_tests/test_http.py | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/tests/utils_tests/test_http.py b/tests/utils_tests/test_http.py
|
|
index ed6824429d51..aa9f194a8a53 100644
|
|
--- a/tests/utils_tests/test_http.py
|
|
+++ b/tests/utils_tests/test_http.py
|
|
@@ -1,3 +1,4 @@
|
|
+import platform
|
|
import unittest
|
|
from datetime import datetime
|
|
from unittest import mock
|
|
@@ -317,6 +318,7 @@ def test_parsing_rfc1123(self):
|
|
parsed = parse_http_date('Sun, 06 Nov 1994 08:49:37 GMT')
|
|
self.assertEqual(datetime.utcfromtimestamp(parsed), datetime(1994, 11, 6, 8, 49, 37))
|
|
|
|
+ @unittest.skipIf(platform.architecture()[0] == '32bit', 'The Year 2038 problem.')
|
|
@mock.patch('django.utils.http.datetime.datetime')
|
|
def test_parsing_rfc850(self, mocked_datetime):
|
|
mocked_datetime.side_effect = datetime
|