Merge pull request #1457 from raymondhardynike/master
fixes apigateway timestamp to match aws
This commit is contained in:
commit
89d223b0df
@ -1,12 +1,11 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import datetime
|
|
||||||
import requests
|
import requests
|
||||||
|
import time
|
||||||
|
|
||||||
from moto.packages.responses import responses
|
from moto.packages.responses import responses
|
||||||
from moto.core import BaseBackend, BaseModel
|
from moto.core import BaseBackend, BaseModel
|
||||||
from moto.core.utils import iso_8601_datetime_with_milliseconds
|
|
||||||
from .utils import create_id
|
from .utils import create_id
|
||||||
from .exceptions import StageNotFoundException
|
from .exceptions import StageNotFoundException
|
||||||
|
|
||||||
@ -20,8 +19,7 @@ class Deployment(BaseModel, dict):
|
|||||||
self['id'] = deployment_id
|
self['id'] = deployment_id
|
||||||
self['stageName'] = name
|
self['stageName'] = name
|
||||||
self['description'] = description
|
self['description'] = description
|
||||||
self['createdDate'] = iso_8601_datetime_with_milliseconds(
|
self['createdDate'] = int(time.time())
|
||||||
datetime.datetime.now())
|
|
||||||
|
|
||||||
|
|
||||||
class IntegrationResponse(BaseModel, dict):
|
class IntegrationResponse(BaseModel, dict):
|
||||||
@ -300,7 +298,7 @@ class RestAPI(BaseModel):
|
|||||||
self.region_name = region_name
|
self.region_name = region_name
|
||||||
self.name = name
|
self.name = name
|
||||||
self.description = description
|
self.description = description
|
||||||
self.create_date = datetime.datetime.utcnow()
|
self.create_date = int(time.time())
|
||||||
|
|
||||||
self.deployments = {}
|
self.deployments = {}
|
||||||
self.stages = {}
|
self.stages = {}
|
||||||
@ -313,7 +311,7 @@ class RestAPI(BaseModel):
|
|||||||
"id": self.id,
|
"id": self.id,
|
||||||
"name": self.name,
|
"name": self.name,
|
||||||
"description": self.description,
|
"description": self.description,
|
||||||
"createdDate": iso_8601_datetime_with_milliseconds(self.create_date),
|
"createdDate": int(time.time()),
|
||||||
}
|
}
|
||||||
|
|
||||||
def add_child(self, path, parent_id=None):
|
def add_child(self, path, parent_id=None):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user