Merge "Remove mox from nova/tests/unit/test_iptables_network.py"
This commit is contained in:
commit
ecef2eded1
|
@ -15,6 +15,7 @@
|
|||
# under the License.
|
||||
"""Unit Tests for network code."""
|
||||
|
||||
import mock
|
||||
import six
|
||||
|
||||
from nova.network import linux_net
|
||||
|
@ -107,11 +108,9 @@ class IptablesManagerTestCase(test.NoDBTestCase):
|
|||
for table in six.itervalues(self.manager.ipv6):
|
||||
table.dirty = False
|
||||
|
||||
def error_apply():
|
||||
raise test.TestingException()
|
||||
|
||||
self.stubs.Set(self.manager, '_apply', error_apply)
|
||||
self.manager.apply()
|
||||
with mock.patch.object(self.manager, '_apply') as mock_apply:
|
||||
self.manager.apply()
|
||||
self.assertFalse(mock_apply.called)
|
||||
|
||||
def test_filter_rules_are_wrapped(self):
|
||||
current_lines = self.sample_filter
|
||||
|
|
Loading…
Reference in New Issue