File: test_req_http.py

package info (click to toggle)
python-odoorpc 0.10.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 604 kB
  • sloc: python: 3,461; makefile: 154; sh: 36
file content (16 lines) | stat: -rw-r--r-- 445 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# -*- coding: utf-8 -*-

from odoorpc.tests import BaseTestCase


class TestReqHTTP(BaseTestCase):
    def _req_http(self, url):
        response = self.odoo.http(url)
        binary_data = response.read()
        self.assertTrue(binary_data)

    def test_req_http_with_leading_slash(self):
        self._req_http('/web/binary/company_logo')

    def test_req_http_without_leading_slash(self):
        self._req_http('web/binary/company_logo')