Merge lp:~jml/pkgme-devportal/pdf-acceptance-tests into lp:pkgme-devportal

Proposed by Jonathan Lange
Status: Merged
Approved by: James Westby
Approved revision: 32
Merged at revision: 32
Proposed branch: lp:~jml/pkgme-devportal/pdf-acceptance-tests
Merge into: lp:pkgme-devportal
Diff against target: 37 lines (+11/-1)
2 files modified
acceptance/data/pdf/devportal-metadata.json (+4/-0)
acceptance/tests/__init__.py (+7/-1)
To merge this branch: bzr merge lp:~jml/pkgme-devportal/pdf-acceptance-tests
Reviewer Review Type Date Requested Status
James Westby Approve
Review via email: mp+88521@code.launchpad.net

Commit message

Acceptance test for PDF backend.

Description of the change

Simple acceptance test for PDF. Not much to see, really.

To post a comment you must log in.
Revision history for this message
James Westby (james-w) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'acceptance/data/pdf'
2=== added file 'acceptance/data/pdf/devportal-metadata.json'
3--- acceptance/data/pdf/devportal-metadata.json 1970-01-01 00:00:00 +0000
4+++ acceptance/data/pdf/devportal-metadata.json 2012-01-13 15:53:25 +0000
5@@ -0,0 +1,4 @@
6+{
7+ "package_name": "jabberwocky",
8+ "tagline": "The Jabberwocky, by Lewis Carroll"
9+}
10
11=== added file 'acceptance/data/pdf/jabberwocky.pdf'
12Binary files acceptance/data/pdf/jabberwocky.pdf 1970-01-01 00:00:00 +0000 and acceptance/data/pdf/jabberwocky.pdf 2012-01-13 15:53:25 +0000 differ
13=== modified file 'acceptance/tests/__init__.py'
14--- acceptance/tests/__init__.py 2012-01-09 16:58:55 +0000
15+++ acceptance/tests/__init__.py 2012-01-13 15:53:25 +0000
16@@ -36,7 +36,7 @@
17
18 def run_pkgme(self, test_data):
19 pkgme.write_packaging(
20- test_data.path, allowed_backend_names=["binary"])
21+ test_data.path, allowed_backend_names=["binary", "pdf"])
22
23 def test_empty(self):
24 """Should fail for a project with no binaries."""
25@@ -60,6 +60,12 @@
26 self.assertThat(
27 os.path.join(test_data.path, "debian", "control"), PathExists())
28
29+ def test_pdf(self):
30+ test_data = self.useFixture(TestData("pdf"))
31+ self.run_pkgme(test_data)
32+ self.assertThat(
33+ os.path.join(test_data.path, "debian", "control"), PathExists())
34+
35
36 def test_suite():
37 import unittest

Subscribers

People subscribed via source and target branches