Replace deprecated django.utils.datetime_safe
datetime_safe was deprecated and was removed in Django 5.0 [1]. [1] https://code.djangoproject.com/ticket/32738 Story: 2011506 Task: 52652 Change-Id: Icf7c07bc5b8c6f974980b1ecaba843d0bf599961 Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -13,10 +13,9 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
from datetime import timedelta
|
import datetime
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.utils import datetime_safe
|
|
||||||
|
|
||||||
from keystoneclient import access
|
from keystoneclient import access
|
||||||
from keystoneclient.v2_0 import tenants
|
from keystoneclient.v2_0 import tenants
|
||||||
@@ -235,7 +234,7 @@ def data(TEST):
|
|||||||
TEST.tenants.add(tenant, disabled_tenant, tenant_unicode)
|
TEST.tenants.add(tenant, disabled_tenant, tenant_unicode)
|
||||||
TEST.tenant = tenant # Your "current" tenant
|
TEST.tenant = tenant # Your "current" tenant
|
||||||
|
|
||||||
tomorrow = datetime_safe.datetime.now() + timedelta(days=1)
|
tomorrow = datetime.datetime.now() + datetime.timedelta(days=1)
|
||||||
expiration = tomorrow.isoformat()
|
expiration = tomorrow.isoformat()
|
||||||
|
|
||||||
scoped_token_dict = {
|
scoped_token_dict = {
|
||||||
|
Reference in New Issue
Block a user