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

Accounting for CloudFlare TTL alias

This commit is contained in:
Brian E Clow
2021-06-23 13:38:58 -07:00
parent 07aad177b5
commit 0967858554
2 changed files with 20 additions and 9 deletions

View File

@@ -1410,3 +1410,11 @@ class TestCloudflareProvider(TestCase):
with self.assertRaises(CloudflareRateLimitError) as ctx:
provider.zone_records(zone)
self.assertEquals('last', text_type(ctx.exception))
def test_ttl_mapping(self):
provider = CloudflareProvider('test', 'email', 'token')
self.assertEquals(120, provider._ttl_data(120))
self.assertEquals(120, provider._ttl_data(120))
self.assertEquals(3600, provider._ttl_data(3600))
self.assertEquals(300, provider._ttl_data(1))