Unittest

Tests everything apart from html generation, as that heavily depends on the templates.
(I could test that the right parameters pass for template substitution, but manually checking that the xblock is working in the studio/lms/workbench would possibly be less trouble.)