Fixes for #103 test suits failed

The error is due to `request.META` is a `Mock` object.
Initialise `request.META` as a dictionary can eliminate the error.

Fixes #103