MCPcopy Index your code
hub / github.com/python-openxml/python-docx / rels

Method rels

tests/opc/test_rel.py:155–170  ·  view source on GitHub ↗

Populated Relationships instance that will exercise the rels.xml property.

(self)

Source from the content-addressed store, hash-verified

153
154 @pytest.fixture
155 def rels(self):
156 """
157 Populated Relationships instance that will exercise the rels.xml
158 property.
159 """
160 rels = Relationships("/baseURI")
161 rels.add_relationship(
162 reltype="http://rt-hyperlink",
163 target="http://some/link",
164 rId="rId1",
165 is_external=True,
166 )
167 part = Mock(name="part")
168 part.partname.relative_ref.return_value = "../media/image1.png"
169 rels.add_relationship(reltype="http://rt-image", target=part, rId="rId2")
170 return rels
171
172 @pytest.fixture
173 def rels_elm(self):

Callers

nothing calls this directly

Calls 2

add_relationshipMethod · 0.95
RelationshipsClass · 0.90

Tested by

no test coverage detected