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

f-strings for the rest of the tests

This commit is contained in:
Ross McFarland
2021-09-16 19:55:22 -07:00
parent 9156bdaea0
commit 775917f4b9
12 changed files with 55 additions and 73 deletions

View File

@@ -1653,7 +1653,7 @@ class TestNs1ProviderDynamic(TestCase):
'meta': {
'priority': 1,
'weight': 12,
'note': 'from:{}'.format(catchall_pool_name),
'note': f'from:{catchall_pool_name}',
},
'region': catchall_pool_name,
}, {
@@ -1774,8 +1774,7 @@ class TestNs1ProviderDynamic(TestCase):
partial_oc_cntry_list
data4 = provider._data_for_A('A', ns1_record)
for c in partial_oc_cntry_list:
self.assertTrue(
'OC-{}'.format(c) in data4['dynamic']['rules'][0]['geos'])
self.assertTrue(f'OC-{c}' in data4['dynamic']['rules'][0]['geos'])
# NA test cases
# 1. Full list of countries should return 'NA' in geos
@@ -1792,8 +1791,7 @@ class TestNs1ProviderDynamic(TestCase):
partial_na_cntry_list
data6 = provider._data_for_A('A', ns1_record)
for c in partial_na_cntry_list:
self.assertTrue(
'NA-{}'.format(c) in data6['dynamic']['rules'][0]['geos'])
self.assertTrue(f'NA-{c}' in data6['dynamic']['rules'][0]['geos'])
# Test out fallback only pools and new-style notes
ns1_record = {
@@ -1919,7 +1917,7 @@ class TestNs1ProviderDynamic(TestCase):
'meta': {
'priority': 1,
'weight': 12,
'note': 'from:{}'.format(catchall_pool_name),
'note': f'from:{catchall_pool_name}',
},
'region': catchall_pool_name,
}, {