Allow to print multiple badges on one page (#1380)

* Allow to print multiple badges on one page

* Fix test

* Add more sizes

* Add A4 sizes
This commit is contained in:
Raphael Michel
2020-02-04 17:02:33 +01:00
committed by GitHub
parent 734f65b10b
commit 87b10ef055
3 changed files with 147 additions and 20 deletions

View File

@@ -49,17 +49,20 @@ def test_generate_pdf(env):
with pytest.raises(OrderError):
e.render({
'items': [shirt.pk],
'rendering': 'one',
'include_pending': False
})
with pytest.raises(OrderError):
e.render({
'items': [],
'rendering': 'one',
'include_pending': True
})
fname, ftype, buf = e.render({
'items': [shirt.pk],
'rendering': 'one',
'include_pending': True
})
assert ftype == 'application/pdf'