<s> from __future__ import ( <EOL> absolute_import , <EOL> print_function , <EOL> unicode_literals , <EOL> ) <EOL> import unittest <EOL> from pydocx . openxml . packaging import ( <EOL> MainDocumentPart , <EOL> WordprocessingDocument , <EOL> ) <EOL> from pydocx . openxml . wordprocessing import Document <EOL> from pydocx . test . utils import WordprocessingDocumentFactory <EOL> from pydocx . util . zip import create_zip_archive <EOL> class MainDocumentPartTestCase ( unittest . TestCase ) : <EOL> def test_document_property_is_a_Document_instance ( self ) : <EOL> factory = WordprocessingDocumentFactory ( ) <EOL> factory . add ( MainDocumentPart , '<STR_LIT>' ) <EOL> package = create_zip_archive ( factory . to_zip_dict ( ) ) <EOL> document = WordprocessingDocument ( path = package ) <EOL> part = document . main_document_part <EOL> assert isinstance ( part . document , Document ) , part . document </s>
