1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

Some syntax and style improvements

This commit is contained in:
Jörg Runkel
2019-02-13 17:45:23 +01:00
parent 54787529d5
commit c1911c10a3
2 changed files with 5 additions and 7 deletions

View File

@@ -546,11 +546,9 @@ class Route53Provider(BaseProvider):
return self._health_checks
def _healthcheck_measure_latency(self, record):
return (
record._octodns.get('route53', {})
.get('healthcheck', {})
return record._octodns.get('route53', {}) \
.get('healthcheck', {}) \
.get('measure_latency', True)
)
def _health_check_equivilent(self, host, path, protocol, port,
measure_latency, health_check,

View File

@@ -885,7 +885,7 @@ class TestRoute53Provider(TestCase):
}
})
measure_latency = provider._healthcheck_measure_latency(record_true)
self.assertEquals(True, measure_latency)
self.assertTrue(measure_latency)
record_default = Record.new(self.expected, 'a', {
'ttl': 61,
@@ -893,7 +893,7 @@ class TestRoute53Provider(TestCase):
'value': '1.2.3.4',
})
measure_latency = provider._healthcheck_measure_latency(record_default)
self.assertEquals(True, measure_latency)
self.assertTrue(measure_latency)
record_false = Record.new(self.expected, 'a', {
'ttl': 61,
@@ -910,7 +910,7 @@ class TestRoute53Provider(TestCase):
}
})
measure_latency = provider._healthcheck_measure_latency(record_false)
self.assertEquals(False, measure_latency)
self.assertFalse(measure_latency)
def test_create_health_checks_measure_latency(self):
provider, stubber = self._get_stubbed_provider()