Merge "Remove mox from nova/tests/unit/test_iptables_network.py"

This commit is contained in:
Jenkins 2016-06-09 10:23:03 +00:00 committed by Gerrit Code Review
commit ecef2eded1
1 changed files with 4 additions and 5 deletions

View File

@ -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