Question about User Management

I am getting the below failed test.

client = <FlaskClient <Flask ‘mflix.factory’>>

@pytest.mark.user_management
def test_login(client):
    result = login_user(test_user.get('email'), test_user.get('jwt'))
    assert result == {'success': True}
    session_result = get_user_session(test_user.get('email'))
  assert session_result.get('user_id') == test_user.get('email')

E AttributeError: ‘NoneType’ object has no attribute ‘get’

tests\test_user_management.py:45: AttributeError

My code is as below

Please check this function as well.

Kanika