#847 closed defect (fixed)
No sources for files in mediagoblin/tests/test_submission/
Reported by: | Simon Fondrie-Teitler | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 0.8.0 |
Component: | programming | Keywords: | |
Cc: | Parent Tickets: | 518 |
Description
The following files in mediagoblin/tests/test_submission/ don't have sources that I can find. Would you mind adding them?
big.png
bigblue.png
good.jpg
good.pdf
good.png
medium.png
Attachments (2)
Change History (9)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Owner: | set to |
---|---|
Status: | new → in_progress |
comment:3 by , 11 years ago
Owner: | changed from | to
---|
Heya. Okay, added source files and legal stuff to everything, with one exception, which is the good.pdf. I'm not sure of the provenance on that... I assume alonl would know?
comment:4 by , 11 years ago
Fixed with commit 1917cf329de6ac8fc68766b422ca92818b4c5db4 "test_submission: use our own pdf doc as GOOD_PDF, remove non distributable good.pdf" at git@…:mediagoblin/alons-mediagoblin.git branch 847
Here as well:
commit 1917cf329de6ac8fc68766b422ca92818b4c5db4
Author: Alon Levy <alevy@…>
Date: Mon Feb 10 00:05:51 2014 +0200
test_submission: use our own pdf doc as GOOD_PDF, remove non distributable good.pdf
Signed-off-by: Alon Levy <alevy@…>
diff --git a/mediagoblin/tests/test_pdf.py b/mediagoblin/tests/test_pdf.py
index b4d1940..7e0769a 100644
--- a/mediagoblin/tests/test_pdf.py
+++ b/mediagoblin/tests/test_pdf.py
@@ -26,14 +26,20 @@ from .resources import GOOD_PDF as GOOD
@pytest.mark.skipif("not check_prerequisites()")
def test_pdf():
- good_dict = {'pdf_version_major': 1, 'pdf_title': ,
- 'pdf_page_size_width': 612, 'pdf_author': ,
- 'pdf_keywords': , 'pdf_pages': 10,
- 'pdf_producer': 'dvips + GNU Ghostscript 7.05',
- 'pdf_version_minor': 3,
- 'pdf_creator': 'LaTeX with hyperref package',
- 'pdf_page_size_height': 792}
- assert pdf_info(GOOD) == good_dict
+ expected_dict = {'pdf_author': -1,
+ 'pdf_creator': -1,
+ 'pdf_keywords': -1,
+ 'pdf_page_size_height': -1,
+ 'pdf_page_size_width': -1,
+ 'pdf_pages': -1,
+ 'pdf_producer': -1,
+ 'pdf_title': -1,
+ 'pdf_version_major': 1,
+ 'pdf_version_minor': -1}
+ good_info = pdf_info(GOOD)
+ for k, v in expected_dict.items():
+ assert(k in good_info)
+ assert(v == -1 or v == good_info[k])
temp_dir = tempfile.mkdtemp()
create_pdf_thumb(GOOD, os.path.join(temp_dir, 'good_256_256.png'), 256, 256)
shutil.rmtree(temp_dir)
diff --git a/mediagoblin/tests/test_submission.py b/mediagoblin/tests/test_submission.py
index b5b13ed..6505dac 100644
--- a/mediagoblin/tests/test_submission.py
+++ b/mediagoblin/tests/test_submission.py
@@ -145,7 +145,7 @@ class TestSubmission:
def test_normal_png(self):
self.check_normal_upload(u'Normal upload 2', GOOD_PNG)
- @pytest.mark.skipif("not pdf_check_prerequisites()")
+ @pytest.mark.skipif("not os.path.exists(GOOD_PDF) or not pdf_check_prerequisites()")
def test_normal_pdf(self):
response, context = self.do_post({'title': u'Normal upload 3 (pdf)'},
do_follow=True,
diff --git a/mediagoblin/tests/test_submission/good.pdf b/mediagoblin/tests/test_submission/good.pdf
deleted file mode 100644
index ab5db00..0000000
Binary files a/mediagoblin/tests/test_submission/good.pdf and /dev/null differ
diff --git a/mediagoblin/tests/test_submission/good.pdf b/mediagoblin/tests/test_submission/good.pdf
new file mode 120000
index 0000000..d7029f3
--- /dev/null
+++ b/mediagoblin/tests/test_submission/good.pdf
@@ -0,0 +1 @@
+../../../docs/build/latex/GNUMediaGoblin.pdf
\ No newline at end of file
by , 11 years ago
Attachment: | 0001-test_submission-use-our-own-pdf-doc-as-GOOD_PDF-remo.patch added |
---|
Patch to fix defect
comment:5 by , 10 years ago
Owner: | removed |
---|---|
Status: | in_progress → review |
by , 10 years ago
Attachment: | 0001-pdf-tests-use-our-own-pdf-doc-as-GOOD_PDF.patch added |
---|
updated to apply on a5cae60284265c5c6a68239d0e96ecbca97e1821, 2nd try
comment:6 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | review → closed |
Merged and closed! Hurrah! Thanks alonl! :)
comment:7 by , 10 years ago
Milestone: | → 0.8.0 |
---|
If this is a showstopper for Debian packaging, I propose that you simply create a DFSG-free tarball that doesn't have these, and disable those tests by a Debian-specific patch.
No reason to hold up the package for a minor issue like this IMHO.