Fix mock of open() for mock 1.1.0

Mock out open() properly.

Change-Id: Iae77d83593a53064b2284fb4d5d1a4346db65bb4
This commit is contained in:
Doug Hellmann 2015-07-10 13:21:34 +00:00
parent c5c53c593b
commit 1eb6d65893

View File

@ -396,7 +396,7 @@ class TestJinjaView(base.BaseTestCase):
super(TestJinjaView, self).setUp()
self.model = base_model.ReportModel(data={'int': 1, 'string': 'value'})
@mock.patch('six.moves.builtins.open', new=MM_OPEN)
@mock.mock_open(MM_OPEN)
def test_load_from_file(self):
self.model.attached_view = jv.JinjaView(path='a/b/c/d.jinja.txt')