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 making the dict a static class value.