0001-tests-also-run-wcs-tests-in-python-3-38679.patch
combo/apps/wcs/models.py | ||
---|---|---|
514 | 514 |
form['order'] = manual_order.index(form_reference) |
515 | 515 |
except ValueError: |
516 | 516 |
form['order'] = 9999 |
517 |
extra_context['forms'] = sorted(extra_context['forms'], key=lambda x: x.get('order')) |
|
517 |
extra_context['forms'] = sorted(extra_context['forms'], key=lambda x: x.get('order', 9999))
|
|
518 | 518 | |
519 | 519 |
if self.limit: |
520 | 520 |
if len(extra_context['forms']) > self.limit: |
get_wcs.sh | ||
---|---|---|
1 | 1 |
#!/bin/sh -xue |
2 | 2 | |
3 |
cd $TOX_WORK_DIR |
|
3 | 4 |
test -d wcs || git clone http://git.entrouvert.org/wcs.git |
4 | 5 |
(cd wcs && git pull) |
6 |
rm -rf wcs/tests |
tests/test_wcs.py | ||
---|---|---|
205 | 205 |
run_wcs_script('create-user', hostname) |
206 | 206 |
run_wcs_script('create-data', hostname) |
207 | 207 | |
208 |
fd = file(os.path.join(WCS_DIR, hostname, 'site-options.cfg'), 'w')
|
|
208 |
fd = open(os.path.join(WCS_DIR, hostname, 'site-options.cfg'), 'w')
|
|
209 | 209 |
fd.write('''[api-secrets] |
210 | 210 |
combo = combo |
211 | 211 |
''') |
tox.ini | ||
---|---|---|
5 | 5 |
[testenv] |
6 | 6 |
usedevelop = True |
7 | 7 |
setenv = |
8 |
py2: WCS_MANAGE=wcs/wcsctl.py
|
|
8 |
WCS_MANAGE={toxworkdir}/wcs/wcsctl.py
|
|
9 | 9 |
DJANGO_SETTINGS_MODULE=combo.settings |
10 | 10 |
COMBO_SETTINGS_FILE=tests/settings.py |
11 |
TOX_WORK_DIR={toxworkdir} |
|
11 | 12 |
coverage: COVERAGE=--cov-report xml --cov-report html --cov=combo/ |
12 | 13 |
deps = |
13 | 14 |
django>=1.11,<1.12 |
... | ... | |
26 | 27 |
django-mellon>=1.13 |
27 | 28 |
py2: django-jsonfield<1.3 |
28 | 29 |
py2: quixote<3.0 |
29 |
py2: vobject |
|
30 |
py2: django-ratelimit<3 |
|
30 |
py3: quixote>=3.0 |
|
31 |
vobject |
|
32 |
django-ratelimit<3 |
|
31 | 33 |
git+http://git.entrouvert.org/debian/django-ckeditor.git |
32 | 34 |
commands = |
33 | 35 |
py2: ./getlasso.sh |
34 | 36 |
py3: ./getlasso3.sh |
35 |
py2: ./get_wcs.sh
|
|
37 |
./get_wcs.sh |
|
36 | 38 |
python manage.py compilemessages |
37 | 39 |
py.test {env:COVERAGE:} {posargs: --junitxml=junit-{envname}.xml tests/} |
38 | 40 |
pylint: ./pylint.sh combo/ |
39 |
- |