'Mock that patches all the _write_* methods of PackageWriter'

@pytest.fixture
def _write_methods(self, request):

    root_mock = Mock(name='PackageWriter')
    patch1 = patch.object(PackageWriter, '_write_content_types_stream')
    patch2 = patch.object(PackageWriter, '_write_pkg_rels')
    patch3 = patch.object(PackageWriter, '_write_parts')
    root_mock.attach_mock(patch1.start(), '_write_content_types_stream')
    root_mock.attach_mock(patch2.start(), '_write_pkg_rels')
    root_mock.attach_mock(patch3.start(), '_write_parts')
    def fin():
        patch1.stop()
        patch2.stop()
        patch3.stop()
    request.addfinalizer(fin)
    return root_mock
