Fixed tests and make it compatible with drf 3.0.1