The first commit fixes one problem with the tests, but there is still another failure on EL7 which I am not sure how to fix. This one looks to be because of an older SQLAlchemy version?
=================================== FAILURES =================================== ______________________________ test_create_waiver ______________________________ client = <FlaskClient <Flask 'waiverdb.app'>> session = <sqlalchemy.orm.scoping.scoped_session object at 0x2afe7d0> def test_create_waiver(client, session): data = { 'result_id': 123, 'product_version': 'fool-1', 'waived': True, 'comment': 'it broke', } r = client.post('/api/v1.0/waivers/', data=json.dumps(data), > content_type='application/json') tests/test_api_v10.py:23: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python2.7/site-packages/werkzeug/test.py:770: in post return self.open(*args, **kw) /usr/lib/python2.7/site-packages/flask/testing.py:108: in open follow_redirects=follow_redirects) /usr/lib/python2.7/site-packages/werkzeug/test.py:734: in open response = self.run_wsgi_app(environ, buffered=buffered) /usr/lib/python2.7/site-packages/werkzeug/test.py:657: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) /usr/lib/python2.7/site-packages/werkzeug/test.py:853: in run_wsgi_app app_iter = app(environ, start_response) /usr/lib/python2.7/site-packages/flask/app.py:1836: in __call__ return self.wsgi_app(environ, start_response) /usr/lib/python2.7/site-packages/flask/app.py:1820: in wsgi_app response = self.make_response(self.handle_exception(e)) /usr/lib/python2.7/site-packages/flask/app.py:1403: in handle_exception reraise(exc_type, exc_value, tb) /usr/lib/python2.7/site-packages/flask/app.py:1817: in wsgi_app response = self.full_dispatch_request() /usr/lib/python2.7/site-packages/flask/app.py:1477: in full_dispatch_request rv = self.handle_user_exception(e) /usr/lib/python2.7/site-packages/flask/app.py:1381: in handle_user_exception reraise(exc_type, exc_value, tb) /usr/lib/python2.7/site-packages/flask/app.py:1475: in full_dispatch_request rv = self.dispatch_request() /usr/lib/python2.7/site-packages/flask/app.py:1461: in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) waiverdb/utils.py:21: in wrapped rv = f(*args, **kwargs) waiverdb/api_v1.py:46: in create_waiver db.session.add(waiver) /usr/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.py:150: in do return getattr(self.registry(), name)(*args, **kwargs) /usr/lib64/python2.7/site-packages/sqlalchemy/util/_collections.py:913: in __call__ val = self.registry.value = self.createfunc() /usr/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py:704: in create_session return SignallingSession(self, **options) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <flask_sqlalchemy.SignallingSession object at 0x2b06250> db = <SQLAlchemy engine='sqlite://'>, autocommit = False, autoflush = True options = {'binds': {}} bind = <sqlalchemy.engine.base.Connection object at 0x2a41250> def __init__(self, db, autocommit=False, autoflush=True, **options): #: The application that this session belongs to. self.app = db.get_app() self._model_changes = {} #: A flag that controls whether this session should keep track of #: model modifications. The default value for this attribute #: is set from the ``SQLALCHEMY_TRACK_MODIFICATIONS`` config #: key. self.emit_modification_signals = \ self.app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] bind = options.pop('bind', None) or db.engine SessionBase.__init__(self, autocommit=autocommit, autoflush=autoflush, bind=bind, > binds=db.get_binds(self.app), **options) E TypeError: __init__() got multiple values for keyword argument 'binds' /usr/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py:160: TypeError ====================== 1 failed, 1 passed in 0.09 seconds ======================
It could be because of an old flask-sqlalchemy.
This has been set in the default config.
Yeah a few deps are older in EPEL7... Actually the topic is really EPEL7 compatibility not RHEL7, I should update the description.
Oh yeah so I can just take out this line, you mean?
rebased
The TypeError pasted above is fixed by PR#4 so this is actually enough to get the tests passing in EPEL7 now.
:+1:
Pull-Request has been merged by ralph