def test_client_login_fails(db): client = JSONAPIClient() with pytest.raises(exceptions.AuthenticationFailed): client.login('someuser', 'invalidpw')