Change lease start date in some test scenarios
This patch changes the start date of leases to "now" to prevent them from being rejected for starting before the current date. Closes-Bug: #1737880 Change-Id: Ic6b66c2b321ea01ebe9d71486e4357f5b93a5fe2
This commit is contained in:
parent
471157beb1
commit
a96150009d
@ -53,7 +53,7 @@ class TestHostReservationScenario(rrs.ResourceReservationScenarioTest):
|
||||
current_time = datetime.datetime.utcnow()
|
||||
end_time = current_time + datetime.timedelta(hours=1)
|
||||
body = {
|
||||
"start_date": current_time.strftime('%Y-%m-%d %H:%M'),
|
||||
"start_date": "now",
|
||||
"end_date": end_time.strftime('%Y-%m-%d %H:%M'),
|
||||
"name": lease_name,
|
||||
"events": [],
|
||||
@ -75,7 +75,7 @@ class TestHostReservationScenario(rrs.ResourceReservationScenarioTest):
|
||||
current_time = datetime.datetime.utcnow()
|
||||
end_time = current_time + datetime.timedelta(hours=1)
|
||||
body = {
|
||||
"start_date": current_time.strftime('%Y-%m-%d %H:%M'),
|
||||
"start_date": "now",
|
||||
"end_date": end_time.strftime('%Y-%m-%d %H:%M'),
|
||||
"name": lease_name,
|
||||
"events": [],
|
||||
@ -96,7 +96,7 @@ class TestHostReservationScenario(rrs.ResourceReservationScenarioTest):
|
||||
current_time = datetime.datetime.utcnow()
|
||||
end_time = current_time + datetime.timedelta(hours=1)
|
||||
body = {
|
||||
"start_date": current_time.strftime('%Y-%m-%d %H:%M'),
|
||||
"start_date": "now",
|
||||
"end_date": end_time.strftime('%Y-%m-%d %H:%M'),
|
||||
"name": lease_name,
|
||||
"events": [],
|
||||
@ -118,7 +118,7 @@ class TestHostReservationScenario(rrs.ResourceReservationScenarioTest):
|
||||
current_time = datetime.datetime.utcnow()
|
||||
end_time = current_time + datetime.timedelta(seconds=90)
|
||||
body = {
|
||||
'start_date': current_time.strftime('%Y-%m-%d %H:%M'),
|
||||
'start_date': "now",
|
||||
'end_date': end_time.strftime('%Y-%m-%d %H:%M'),
|
||||
'name': lease_name,
|
||||
'events': [],
|
||||
|
Loading…
x
Reference in New Issue
Block a user