Verify MIME validity in resources ($20) #34
Using the mimetypes Python module, add a check in the Resource class's type setter, to only allow valid MIME types (and "direct/json") as resource types. All normal MIME type resources have their content represented as strings, "direct/json" is for JSON-serializable content, such as dict objects. Don't worry about being strict about making sure the content is valid for the resource type - we'll do that in a separate issue.
Bounty is $50.
(Copied from acceptance criteria)
Use mimetypes.types_map.values() as the basis for verifying valid resource types, as well as a list of “special exceptions” we have to guarantee will work - unique ones such as “direct/json”, and merely obscure ones such as “text/lua”.