def test_export(self): resume = factories.ResumeFactory() url = reverse('admin:curriculum_resume_changelist') data = { '_export': '_export', '_selected_action': [resume.id], 'action': ['export_resume'], } response = self.client.post(url, data) self.assertEqual(response.status_code, 200)
def test_get(self): resume = factories.ResumeFactory() url = reverse('admin:curriculum_resume_changelist') data = { '_selected_action': [resume.id], 'action': 'export_resume', 'index': '0', 'select_across': '0', } response = self.client.post(url, data) self.assertEqual(response.status_code, 200) self.assertContains(response, resume.title)
def test_basic(self): resume = factories.ResumeFactory() export.single_page(resume)
def test_func(self): resume = factories.ResumeFactory() pdf, result = export.export_pdf(resume, lambda x: x.__str__()) raw_pdf = result.getvalue() self.assertFalse(pdf.err)
def test_basic(self): resume = factories.ResumeFactory() export.custom_classic(resume)
def test_with_image(self): resume = factories.ResumeFactory(image=MEDIA_IMAGE_URL) export.single_page(resume)
def test_view(self): resume = factories.ResumeFactory() url = reverse('single_page', args=[resume.id]) response = self.client.get(url) self.assertEqual(response.status_code, 200)
def test_view(self): resume = factories.ResumeFactory() url = reverse('reveal-js', args=[resume.id]) response = self.client.get(url) self.assertEqual(200, response.status_code)