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

@@ -14,7 +14,7 @@ class TestEnvVarSource(TestCase):
source = EnvVarSource('testid', envvar, 'recordname', ttl=120)
with self.assertRaises(EnvironmentVariableNotFoundException) as ctx:
source._read_variable()
msg = 'Unknown environment variable {}'.format(envvar)
msg = f'Unknown environment variable {envvar}'
self.assertEquals(msg, text_type(ctx.exception))
with patch.dict('os.environ', {envvar: 'testvalue'}):
@@ -35,7 +35,7 @@ class TestEnvVarSource(TestCase):
self.assertEquals(1, len(zone.records))
record = list(zone.records)[0]
self.assertEquals(name, record.name)
self.assertEquals('{}.{}'.format(name, zone_name), record.fqdn)
self.assertEquals(f'{name}.{zone_name}', record.fqdn)
self.assertEquals('TXT', record._type)
self.assertEquals(1, len(record.values))
self.assertEquals(value, record.values[0])