mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[IMP] report_qr: black, isort
This commit is contained in:
committed by
Kiplangat Dan
parent
1a52e3dab5
commit
ba66252734
@@ -5,17 +5,16 @@ from odoo.tests.common import HttpCase
|
||||
|
||||
|
||||
class TestReportQr(HttpCase):
|
||||
|
||||
def test_qr_generation(self):
|
||||
data = 'TEST'
|
||||
image = self.url_open('/report/qr?value=%s' % data)
|
||||
self.assertEqual(image.headers['Content-type'], 'image/png')
|
||||
data = "TEST"
|
||||
image = self.url_open("/report/qr?value=%s" % data)
|
||||
self.assertEqual(image.headers["Content-type"], "image/png")
|
||||
|
||||
def test_qr_overflow(self):
|
||||
"""There is a QR limitation for 4296 characters, we will test that an
|
||||
Exception is raised"""
|
||||
new_data = ''
|
||||
new_data = ""
|
||||
for i in range(0, 1500):
|
||||
new_data += 'TEST'
|
||||
new_data += "TEST"
|
||||
with self.assertRaises(Exception):
|
||||
self.env['ir.actions.report'].qr_generate(new_data)
|
||||
self.env["ir.actions.report"].qr_generate(new_data)
|
||||
|
||||
Reference in New Issue
Block a user