Closed edhaz closed 2 years ago
@marksteward Could do with a re-run of the CI when you get a chance on this and #277 as the issue with flaks-login has had a new version pushed out :)
Going to need to dig into this, I'm not sure if it's due to flask-login
changes or close_all_sessions
:
=================================== FAILURES ===================================
________________ TestFlaskPlugin.test_versioning_inside_request ________________
self = <tests.plugins.test_flask.TestFlaskPlugin object at 0x7fde0ef38be0>
def test_versioning_inside_request(self):
user = self.User(name=u'Rambo')
self.session.add(user)
self.session.commit()
self.login(user)
self.client.get(url_for('.test_simple_flush'))
article = self.session.query(self.Article).first()
tx = article.versions[-1].transaction
> assert tx.user.id == user.id
E AttributeError: 'NoneType' object has no attribute 'id'
Going to need to dig into this, I'm not sure if it's due to
flask-login
changes orclose_all_sessions
:=================================== FAILURES =================================== ________________ TestFlaskPlugin.test_versioning_inside_request ________________ self = <tests.plugins.test_flask.TestFlaskPlugin object at 0x7fde0ef38be0> def test_versioning_inside_request(self): user = self.User(name=u'Rambo') self.session.add(user) self.session.commit() self.login(user) self.client.get(url_for('.test_simple_flush')) article = self.session.query(self.Article).first() tx = article.versions[-1].transaction > assert tx.user.id == user.id E AttributeError: 'NoneType' object has no attribute 'id'
Yeah looks like it's an issue with using flask-login 0.6.2, tried it on master
and the test fails there. I'll have a little look to see if there's a workaround/actual issue there.
Rebased and merged, thanks for this!
session.close_all()
has been deprecated in favour oform.close_all_sessions()
After:
659 passed, 99 skipped, 4090 warnings
Before:
659 passed, 99 skipped, 4745 warnings