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
IMO don't use @staticmethod; as this discussed these are normally instance member functions and should be the same in the test, even if your IDE complains about it. Keep your classes/code consistent, if this is annoying in your IDE disable this feature or file a bug for them to fix it.