def test_authentication_subbclass_with_method_in_class():
    app = Sanic()
    sanicjwt = Initialize(app, authentication_class=AuthenticationInClassBody)
    (_, response) = app.test_client.post('/auth', json={'username': 'user1', 'password': 'abcxyz'})
    assert (response.status == 200)
    assert (sanicjwt.config.access_token_name() in response.json)
def test_authentication_subbclass_with_method_in_class():
    app = Sanic()
    sanicjwt = Initialize(app, authentication_class=AuthenticationInClassBody)
    (_, response) = app.test_client.post('/auth', json={'username': 'user1', 'password': 'abcxyz'})
    assert (response.status == 200)
    assert (sanicjwt.config.access_token_name() in response.json)