Fixed lint
This commit is contained in:
parent
7f32b61062
commit
0f1309df41
@ -16,6 +16,7 @@ TO_PATCH = [
|
||||
'get_host_ip',
|
||||
]
|
||||
|
||||
|
||||
def fake_context(settings):
|
||||
def outer():
|
||||
def inner():
|
||||
@ -23,6 +24,7 @@ def fake_context(settings):
|
||||
return inner
|
||||
return outer
|
||||
|
||||
|
||||
class OVSPluginContextTest(CharmTestCase):
|
||||
|
||||
def setUp(self):
|
||||
@ -262,7 +264,6 @@ class DVRSharedSecretContext(CharmTestCase):
|
||||
TO_PATCH)
|
||||
self.config.side_effect = self.test_config.get
|
||||
|
||||
|
||||
@patch('os.path')
|
||||
@patch('uuid.uuid4')
|
||||
def test_secret_created_stored(self, _uuid4, _path):
|
||||
@ -287,7 +288,8 @@ class DVRSharedSecretContext(CharmTestCase):
|
||||
|
||||
@patch.object(context, 'NeutronAPIContext')
|
||||
@patch.object(context, 'get_shared_secret')
|
||||
def test_shared_secretcontext_dvr(self, _shared_secret, _NeutronAPIContext):
|
||||
def test_shared_secretcontext_dvr(self, _shared_secret,
|
||||
_NeutronAPIContext):
|
||||
_NeutronAPIContext.side_effect = fake_context({'enable_dvr': True})
|
||||
_shared_secret.return_value = 'secret_thing'
|
||||
#_use_dvr.return_value = True
|
||||
@ -298,7 +300,8 @@ class DVRSharedSecretContext(CharmTestCase):
|
||||
|
||||
@patch.object(context, 'NeutronAPIContext')
|
||||
@patch.object(context, 'get_shared_secret')
|
||||
def test_shared_secretcontext_nodvr(self, _shared_secret, _NeutronAPIContext):
|
||||
def test_shared_secretcontext_nodvr(self, _shared_secret,
|
||||
_NeutronAPIContext):
|
||||
_NeutronAPIContext.side_effect = fake_context({'enable_dvr': False})
|
||||
_shared_secret.return_value = 'secret_thing'
|
||||
self.resolve_address.return_value = '10.0.0.10'
|
||||
|
@ -1,7 +1,6 @@
|
||||
|
||||
from mock import MagicMock, patch, call
|
||||
from test_utils import CharmTestCase
|
||||
import neutron_ovs_context
|
||||
|
||||
with patch('charmhelpers.core.hookenv.config') as config:
|
||||
config.return_value = 'neutron'
|
||||
|
Loading…
x
Reference in New Issue
Block a user