-
-
Notifications
You must be signed in to change notification settings - Fork 280
Closed
Labels
Description
======================================================================
FAIL: tests.functional.test_requests.test_httpretty_should_allow_adding_and_overwritting_by_kwargs_u2
HTTPretty should allow adding and overwritting headers by keyword args with requests
----------------------------------------------------------------------
Traceback (most recent call last):
File "/nix/store/lj5ly4j5p79s1dzzsgp83jw6l2k96mm6-python3.6-nose-1.3.7/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/nix/store/lj5ly4j5p79s1dzzsgp83jw6l2k96mm6-python3.6-nose-1.3.7/lib/python3.6/site-packages/nose/util.py", line 620, in newfunc
return func(*arg, **kw)
File "/build/httpretty-0.9.6/httpretty/core.py", line 1702, in wrapper
return test(*args, **kw)
File "/nix/store/sgsc1kqhby7z1f2vs71ff9x63mw4wa9i-python3.6-sure-1.4.11/lib/python3.6/site-packages/sure/__init__.py", line 209, in wrap
raise AssertionError(exc.pop(0))
AssertionError: Traceback (most recent call last):
File "/nix/store/sgsc1kqhby7z1f2vs71ff9x63mw4wa9i-python3.6-sure-1.4.11/lib/python3.6/site-packages/sure/__init__.py", line 385, in wrapper
value = func(self, *args, **kw)
File "/nix/store/sgsc1kqhby7z1f2vs71ff9x63mw4wa9i-python3.6-sure-1.4.11/lib/python3.6/site-packages/sure/__init__.py", line 673, in equal
raise error
File "/nix/store/sgsc1kqhby7z1f2vs71ff9x63mw4wa9i-python3.6-sure-1.4.11/lib/python3.6/site-packages/sure/__init__.py", line 654, in equal
comparison = DeepComparison(self.obj, what, epsilon).compare()
File "/nix/store/sgsc1kqhby7z1f2vs71ff9x63mw4wa9i-python3.6-sure-1.4.11/lib/python3.6/site-packages/sure/core.py", line 224, in compare
return self.compare_complex_stuff(X, Y)
File "/nix/store/sgsc1kqhby7z1f2vs71ff9x63mw4wa9i-python3.6-sure-1.4.11/lib/python3.6/site-packages/sure/core.py", line 84, in compare_complex_stuff
return self.complex_cmp_funcs.get(type(X), self.compare_generic)(X, Y)
File "/nix/store/sgsc1kqhby7z1f2vs71ff9x63mw4wa9i-python3.6-sure-1.4.11/lib/python3.6/site-packages/sure/core.py", line 141, in compare_dicts
parent=self,
File "/nix/store/sgsc1kqhby7z1f2vs71ff9x63mw4wa9i-python3.6-sure-1.4.11/lib/python3.6/site-packages/sure/core.py", line 254, in compare
raise exp.as_assertion(original_X, original_Y)
File "/nix/store/sgsc1kqhby7z1f2vs71ff9x63mw4wa9i-python3.6-sure-1.4.11/lib/python3.6/site-packages/sure/core.py", line 57, in as_assertion
raise self.get_assertion(X, Y)
AssertionError: given
X = {'connection': 'close', 'content-length': '27', 'content-type': 'application/json', 'date': 'Tue, 12 Mar 2019 16:06:22 GMT', 'server': 'Apache', 'status': '200'}
and
Y = {'connection': 'close', 'content-length': '27', 'content-type': 'application/json', 'date': 'Tue, 12 Mar 2019 16:06:21 GMT', 'server': 'Apache', 'status': '200'}
X['date'] is 'Tue, 12 Mar 2019 16:06:22 GMT' whereas Y['date'] is 'Tue, 12 Mar 2019 16:06:21 GMT'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/nix/store/sgsc1kqhby7z1f2vs71ff9x63mw4wa9i-python3.6-sure-1.4.11/lib/python3.6/site-packages/sure/__init__.py", line 186, in wrap
func(start, *args, **kw)
File "/build/httpretty-0.9.6/tests/functional/test_requests.py", line 182, in test_httpretty_should_allow_adding_and_overwritting_by_kwargs_u2
'date': now.strftime('%a, %d %b %Y %H:%M:%S GMT'),
File "/nix/store/sgsc1kqhby7z1f2vs71ff9x63mw4wa9i-python3.6-sure-1.4.11/lib/python3.6/site-packages/sure/__init__.py", line 387, in wrapper
raise AssertionError(e)
AssertionError: given
X = {'connection': 'close', 'content-length': '27', 'content-type': 'application/json', 'date': 'Tue, 12 Mar 2019 16:06:22 GMT', 'server': 'Apache', 'status': '200'}
and
Y = {'connection': 'close', 'content-length': '27', 'content-type': 'application/json', 'date': 'Tue, 12 Mar 2019 16:06:21 GMT', 'server': 'Apache', 'status': '200'}
X['date'] is 'Tue, 12 Mar 2019 16:06:22 GMT' whereas Y['date'] is 'Tue, 12 Mar 2019 16:06:21 GMT'
HTTPretty/tests/functional/test_requests.py
Line 182 in 2314893
| 'date': now.strftime('%a, %d %b %Y %H:%M:%S GMT'), |
This makes this test fail randomly due to network lag or unsynced clocks.