I'm trying to create an test that it makes a http request. But I'm getting an error.
ERROR MSG:
ERROR LROERP3273 openerp.addons.report.tests.test_report_crawl: ` HTTPError: HTTP Error 302: The HTTP server returned a redirect error that would lead to an infinite loop.
2016-07-26 14:31:13,782 7084 ERROR LROERP3273 openerp.addons.report.tests.test_report_crawl: ` The last 30x error message was:
2016-07-26 14:31:13,782 7084 ERROR LROERP3273 openerp.addons.report.tests.test_report_crawl: ` FOUND
2016-07-26 14:31:13,782 7084 INFO LROERP3273 openerp.addons.report.tests.test_report_crawl: Ran 1 test in 0.124s
2016-07-26 14:31:13,782 7084 ERROR LROERP3273 openerp.addons.report.tests.test_report_crawl: FAILED
2016-07-26 14:31:13,782 7084 INFO LROERP3273 openerp.addons.report.tests.test_report_crawl: (errors=1)
016-07-26 14:31:13,783 7084 ERROR LROERP3273 openerp.modules.module: Module report: 0 failures, 1 errors.
CODE:
import openerp
class TestReportController(openerp.tests.common.HttpCase):
at_install = False
post_install = True
def test_report_controller(self):
body = self.url_open('/report/barcode?type=QR&value=Test').read()