def test_jwt_login_with_expired_token(self):
        payload = utils.jwt_payload_handler(self.user)
        payload['exp'] = 1
        token = utils.jwt_encode_handler(payload)

        auth = 'Bearer {0}'.format(token)

        response = self.client.post(
            '/auth-token/',
            json.dumps(self.data),
            content_type='application/json',
            HTTP_AUTHORIZATION=auth
        )

        response_content = json.loads(smart_text(response.content))

        decoded_payload = utils.jwt_decode_handler(response_content['token'])

        self.assertEqual(response.status_code, 200)
        self.assertEqual(decoded_payload['username'], self.username)
Calculate the Palmer Drought Severity Index.
dataset/ETHPy150Open jpadilla/django-jwt-auth/tests/test_views.py/ObtainJSONWebTokenTestCase.test_jwt_login_with_expired_token--crossover with--dataset/ETHPy150Open nasa/RHEAS/src/drought.py/calcPDSI