pallets-eco / flask-security

Quick and simple security for Flask applications
MIT License
1.63k stars 513 forks source link

Does not show errors on user/password incorrect in pytest #814

Open idchlife opened 5 years ago

idchlife commented 5 years ago

Here is the code written for testing

@pytest.fixture
def client():
  client = app.test_client()

  with app.app_context():
    db.create_all()

    yield client

    db.session.remove()
    db.drop_all()

def test_most_pages(client: FlaskClient):
  r: Response = client.post("/login", data={
    'email': "some@email.com",
    'password': "somepassword"
  })

  assert r.status_code == 200
  print(r.data)

There are no error messages in html. Nothing.

When I do not provide email/password there is error shown - password/email is not provided