8 add tests to api

## Adding tests for the API
This is in preparation for re-factoring some parts of the API, see issue #8 for more information.
*Note to reviewer*: As usual there are some Django magic and also some Tastypie (rest framework) specific things going on here. Let me know if you want more comments to explain this.
 
Reviewer: @joachimmetz
consider changing your pylintrc to accept unused, as the prefix for unused arguments.
use that instead of _ or dummy_ or a pylint override.