def setUp(self): self.path = join(settings.TEST_DIR, 'documents_attachment') self.documents = join(settings.TEST_DIR, 'documents') with open(join(self.documents, 'pages.json'), 'r') as pages: self.pages = json.load(pages) makedirs(self.path)
def setUp(self): super().setUp() # This is similar to test_web_document self.path = os.path.join(settings.TEST_DIR, 'documents_urls') makedirs(self.path) # Create the sample lead self.lead = self.create_lead_with_url(HTML_URL)
def setUp(self): # This is similar to test_web_document self.path = join(settings.TEST_DIR, 'documents_urls') makedirs(self.path) # Create the sample lead self.user = None self.lead = self.create_or_get_lead() self.lead.text = '' self.lead.url = HTML_URL self.lead.save()
def setUp(self): super().setUp() # This is similar to test_web_document self.path = os.path.join(settings.TEST_DIR, 'documents_urls') makedirs(self.path) # Create the sample lead self.lead = self.create(Lead) self.lead.text = '' self.lead.url = HTML_URL self.lead.save()
def setUp(self): # This is similar to test_file_document self.path = join(settings.TEST_DIR, 'documents_attachment') self.documents = join(settings.TEST_DIR, 'documents') makedirs(self.path) # Create the sample file self.file = File.objects.create( title='test', file=SimpleUploadedFile( name=DOCX_FILE, content=open(join(self.documents, DOCX_FILE), 'rb').read(), ), ) self.file_preview = FilePreview.objects.create( file_ids=[self.file.id], extracted=False, )
def setUp(self): self.path = os.path.join(settings.TEST_DIR, 'documents_urls') with open(os.path.join(self.path, 'pages.json'), 'r') as pages: self.pages = json.load(pages) makedirs(self.path)
def setUp(self): self.path = join(settings.TEST_DIR, 'documents_urls') makedirs(self.path)
def setUp(self): self.path = join(settings.TEST_DIR, 'documents_attachment') self.documents = join(settings.TEST_DIR, 'documents') makedirs(self.path)