mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Fix log formatting and lint compliance
This commit is contained in:
@@ -291,7 +291,8 @@ class DynProvider(BaseProvider):
|
||||
try:
|
||||
fqdn, _type = td.label.split(':', 1)
|
||||
except ValueError as e:
|
||||
self.log.warn("Failed to load TraficDirector '{}': {}".format(td.label, e))
|
||||
self.log.warn("Failed to load TraficDirector '%s': %s",
|
||||
td.label, e.message)
|
||||
continue
|
||||
tds[fqdn][_type] = td
|
||||
self._traffic_directors = dict(tds)
|
||||
|
||||
@@ -8,7 +8,7 @@ from __future__ import absolute_import, division, print_function, \
|
||||
from dyn.tm.errors import DynectGetError
|
||||
from dyn.tm.services.dsf import DSFResponsePool
|
||||
from json import loads
|
||||
from mock import MagicMock, call, patch, Mock
|
||||
from mock import MagicMock, call, patch
|
||||
from unittest import TestCase
|
||||
|
||||
from octodns.record import Create, Delete, Record, Update
|
||||
@@ -650,8 +650,10 @@ class TestDynProviderGeo(TestCase):
|
||||
set(tds.keys()))
|
||||
self.assertEquals(['A'], tds['unit.tests.'].keys())
|
||||
self.assertEquals(['A'], tds['geo.unit.tests.'].keys())
|
||||
provider.log.warn.assert_called_with("Failed to load TraficDirector 'something else': need more than 1 value to unpack")
|
||||
|
||||
provider.log.warn.assert_called_with("Failed to load TraficDirector "
|
||||
"'%s': %s", 'something else',
|
||||
'need more than 1 value to '
|
||||
'unpack')
|
||||
|
||||
@patch('dyn.core.SessionEngine.execute')
|
||||
def test_traffic_director_monitor(self, mock):
|
||||
|
||||
Reference in New Issue
Block a user