Merge pull request #2345 from iisulop/fix_timezone_problem_in_test_create_cluster_boto3
Fix timezone problem in test create cluster boto3
This commit is contained in:
commit
9b535a7c75
@ -78,7 +78,7 @@ class Cluster(TaggableResourceMixin, BaseModel):
|
||||
super(Cluster, self).__init__(region_name, tags)
|
||||
self.redshift_backend = redshift_backend
|
||||
self.cluster_identifier = cluster_identifier
|
||||
self.create_time = iso_8601_datetime_with_milliseconds(datetime.datetime.now())
|
||||
self.create_time = iso_8601_datetime_with_milliseconds(datetime.datetime.utcnow())
|
||||
self.status = 'available'
|
||||
self.node_type = node_type
|
||||
self.master_username = master_username
|
||||
|
@ -36,6 +36,7 @@ def test_create_cluster_boto3():
|
||||
response['Cluster']['NodeType'].should.equal('ds2.xlarge')
|
||||
create_time = response['Cluster']['ClusterCreateTime']
|
||||
create_time.should.be.lower_than(datetime.datetime.now(create_time.tzinfo))
|
||||
create_time.should.be.greater_than(datetime.datetime.now(create_time.tzinfo) - datetime.timedelta(minutes=1))
|
||||
|
||||
|
||||
@mock_redshift
|
||||
|
Loading…
Reference in New Issue
Block a user