def test_logout_before_login_again():
    auth, app, user = _get_flask_app()
    client = app.test_client()

    data = {
        'login': user.login,
        'password': 'foobar',
        '_csrf_token': auth.get_csrf_token(),
    }
    client.post(auth.url_sign_in, data=data)
    assert auth.session in auth.session_key
    uhmac1 = auth.session[auth.session_key]

    data = {
        'login': 'foo',
        'password': 'bar',
        '_csrf_token': auth.get_csrf_token(),
    }
    client.post(auth.url_sign_in, data=data)
    assert auth.session_key in auth.session
    uhmac2 = auth.session[auth.session_key]
    assert uhmac1 != uhmac2
dataset/ETHPy150Open jpscaletti/authcode/tests/test_views.py/test_logout_before_login_again/swapped operands of `in`