コード例 #1
0
    def it_can_be_constructed_by_PartFactory(
        self, partname_, content_type_, blob_, package_, __init_
    ):
        part = Part.load(partname_, content_type_, blob_, package_)

        __init_.assert_called_once_with(ANY, partname_, content_type_, blob_, package_)
        assert isinstance(part, Part)
コード例 #2
0
 def partname_set_fixture(self):
     old_partname = PackURI('/old/part/name')
     new_partname = PackURI('/new/part/name')
     part = Part(old_partname, None, None, None)
     return part, new_partname
コード例 #3
0
 def partname_get_fixture(self):
     partname = PackURI('/part/name')
     part = Part(partname, None, None, None)
     return part, partname
コード例 #4
0
 def part(self):
     part = Part(None, None)
     return part
コード例 #5
0
 def package_get_fixture(self, package_):
     part = Part(None, None, None, package_)
     return part, package_
コード例 #6
0
 def content_type_fixture(self):
     content_type = 'content/type'
     part = Part(None, content_type, None, None)
     return part, content_type
コード例 #7
0
 def blob_fixture(self, blob_):
     part = Part(None, None, blob_, None)
     return part, blob_
コード例 #8
0
 def part(self):
     return Part(None, None)
コード例 #9
0
 def rels_fixture(self, Relationships_, partname_, rels_):
     part = Part(partname_, None)
     return part, Relationships_, partname_, rels_