fixed error when running test on drf 3.01