change usages of long conversion to int for python3
This commit is contained in:
parent
2a8fc19e77
commit
ea2fe6f290
@ -220,7 +220,7 @@ class ELBResponse(BaseResponse):
|
||||
policy.policy_name = policy_name
|
||||
cookie_expirations = [value[0] for key, value in self.querystring.items() if "CookieExpirationPeriod" in key]
|
||||
if cookie_expirations:
|
||||
policy.cookie_expiration_period = long(cookie_expirations[0])
|
||||
policy.cookie_expiration_period = int(cookie_expirations[0])
|
||||
else:
|
||||
policy.cookie_expiration_period = None
|
||||
|
||||
|
@ -334,11 +334,11 @@ def test_create_lb_cookie_stickiness_policy():
|
||||
lb = conn.get_all_load_balancers()[0]
|
||||
# There appears to be a quirk about boto, whereby it returns a unicode
|
||||
# string for cookie_expiration_period, despite being stated in
|
||||
# documentation to be a long.
|
||||
# documentation to be a long numeric.
|
||||
#
|
||||
# To work around that, this value is converted to a long and checked.
|
||||
# To work around that, this value is converted to an int and checked.
|
||||
cookie_expiration_period_response_str = lb.policies.lb_cookie_stickiness_policies[0].cookie_expiration_period
|
||||
long(cookie_expiration_period_response_str).should.equal(cookie_expiration_period)
|
||||
int(cookie_expiration_period_response_str).should.equal(cookie_expiration_period)
|
||||
lb.policies.lb_cookie_stickiness_policies[0].policy_name.should.equal(policy_name)
|
||||
|
||||
@mock_elb
|
||||
|
Loading…
Reference in New Issue
Block a user