oauthclient: error handling and tests

* Add error handling when the exchange of code for access token fails.

* Adds tests to increase test coverage to 97%.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
oauth2server: settings test

* Add simple test of settings view.

* Fixes file header issue and some PEP8 errors.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
oauthclient: helper test case

* Adds test case class to make custom oauthclient testing
  easier.

Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>