def test_jwt_login_json_missing_fields(self):
        response = self.client.post(
            '/auth-token/',
            json.dumps({'username': self.username}),
            content_type='application/json'
        )

        self.assertEqual(response.status_code, 400)
Ensure JWT login view using JSON POST fails if missing fields.
dataset/ETHPy150Open jpadilla/django-jwt-auth/tests/test_views.py/ObtainJSONWebTokenTestCase.test_jwt_login_json_missing_fields