From ea2fe6f29000b044d6b4f8902a67cd7b866efd7e Mon Sep 17 00:00:00 2001 From: Andrew Harris Date: Thu, 16 Jul 2015 18:23:13 -0700 Subject: [PATCH] change usages of long conversion to int for python3 --- moto/elb/responses.py | 2 +- tests/test_elb/test_elb.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/moto/elb/responses.py b/moto/elb/responses.py index d36457508..2aff78b11 100644 --- a/moto/elb/responses.py +++ b/moto/elb/responses.py @@ -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 diff --git a/tests/test_elb/test_elb.py b/tests/test_elb/test_elb.py index 9458b97e4..ec0abecc9 100644 --- a/tests/test_elb/test_elb.py +++ b/tests/test_elb/test_elb.py @@ -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