File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 6
6
import unittest
7
7
8
8
9
+ if sys .version_info [0 ] == 2 and sys .version_info [1 ] == 7 :
10
+ unittest .TestCase .assertRegex = unittest .TestCase .assertRegexpMatches
11
+
12
+
9
13
#Prepend ../ to PYTHONPATH so that we can import PDFKIT form there.
10
14
TESTS_ROOT = os .path .abspath (os .path .dirname (__file__ ))
11
15
sys .path .insert (0 , os .path .realpath (os .path .join (TESTS_ROOT , '..' )))
@@ -80,9 +84,9 @@ def test_options_parsing_with_tuple_no_dashes(self):
80
84
def test_repeatable_options (self ):
81
85
roptions = {
82
86
'--page-size' : 'Letter' ,
83
- 'cookies' : [
87
+ 'cookies' : [
84
88
('test_cookie1' ,'cookie_value1' ),
85
- ('test_cookie2' ,'cookie_value2' ),
89
+ ('test_cookie2' ,'cookie_value2' ),
86
90
]
87
91
}
88
92
Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /usr/bin/env sh
2
+
3
+ WKHTML2PDF_VERSION=' 0.12.4'
2
4
3
5
sudo apt-get install -y openssl build-essential xorg libssl-dev
4
- wget http ://download.gna.org /wkhtmltopdf/0.12/0.12.3/ wkhtmltox-0.12.3_linux -generic-amd64.tar.xz
5
- tar -xJf wkhtmltox-0.12.3_linux -generic-amd64.tar.xz
6
+ wget " https ://github.com /wkhtmltopdf/wkhtmltopdf/releases/download/ ${WKHTML2PDF_VERSION} / wkhtmltox-${WKHTML2PDF_VERSION} _linux -generic-amd64.tar.xz"
7
+ tar -xJf " wkhtmltox-${WKHTML2PDF_VERSION} _linux -generic-amd64.tar.xz"
6
8
cd wkhtmltox
7
9
sudo chown root:root bin/wkhtmltopdf
8
10
sudo cp -r * /usr/
You can’t perform that action at this time.
0 commit comments