Fixed a PyPy compatibility issue in the test fixtures
This construct didn't work under PyPy, as a result of the fact that datetime is implemented in Python in PyPy: A simplification of the problem is this: import datetime class X(datetime.datetime): pass now = datetime.datetime.now() X.isoformat(now) This works under CPython, but fails under PyPy. This is because PyPy creates a normal unbound method for `X.isoformat`, which checks that `now` is an instance of `X`, which it isn't. Because datetime is implemented in C, CPython skips those checks. Change-Id: Id27e7a8b00156bd9688bdb36d2c38b04785c2d0c
This commit is contained in:
parent
0be5871bdd
commit
f359c66e09
@ -250,7 +250,7 @@ def data(TEST):
|
||||
TEST.tenant = tenant # Your "current" tenant
|
||||
|
||||
tomorrow = datetime_safe.datetime.now() + timedelta(days=1)
|
||||
expiration = datetime_safe.datetime.isoformat(tomorrow)
|
||||
expiration = tomorrow.isoformat()
|
||||
|
||||
scoped_token_dict = {
|
||||
'access': {
|
||||
|
Loading…
x
Reference in New Issue
Block a user