blooparksystems / website

Odoo Website builder related addons
GNU Affero General Public License v3.0
10 stars 33 forks source link

[website_seo] [website_seo_blog] Add / Update unit tests if possible #9

Closed rruebner closed 9 years ago

rruebner commented 9 years ago

Goal

kaerdsar commented 9 years ago

I add some test for seo url handling in path_page controller method. I used url_open from HttpCase and with the response I check if the code is between 200 and 300. A bad url must return code > 400 but when I tested Odoo return response with code 200 even though the url does not have page to show. Then the test is not completely fine.

To solve the problem: One option is to find out if the response has another attribute that tell us is actually a bad URL, another option is to change the test implementation and call directly the path_page controller method in class Website instead of url_open method. Any idea?

rruebner commented 9 years ago

@kaerdsar At the moment I have no idea but I will look at it.