okfn/webstore — Issue #47: Current authentication tests do not test anything
Author: rgrp
Created: 2011-11-05 10:13:55+00:00
State: open

Current login tests are not actually testing anything:

* test_login_http_basic_authorization - https://github.com/okfn/webstore/blob/beac22f060eded063a149887e94a06773320076c/test/test_rest.py#L454
* test_login_http_basic_authorization_with_ckan_db - https://github.com/okfn/webstore/blob/beac22f060eded063a149887e94a06773320076c/test/test_rest.py#L467

You can establish this by adding before each auth check the equivalent check without authentication info e.g.

response = self.app.get('/hugo/fixtures', headers={'Accept': JSON})

This will also return 200 rendering the tests meaningless.