I am using kvsession in a flask app and it works as expected. I ran into this while running tests:
Traceback (most recent call last):
File "/home/user/project/tests/base.py", line 20, in setUpClass
cls.app = get_app('testing')
File "/home/user/project/__init__.py", line 30, in get_app
session_store = SQLAlchemyStore(engine, db.Model.metadata, 'kvsession')
File "/home/user/.virtualenvs/project/local/lib/python2.7/site-packages/simplekv/db/sql.py", line 21, in __init__
Column('value', LargeBinary, nullable=False)
File "/home/user/.virtualenvs/project/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 398, in __new__
"existing Table object." % key)
InvalidRequestError: Table 'kvsession' is already defined for this MetaData instance. Specify 'extend_existing=True' to redefine options and columns on an existing Table object.
It somehow happens because the tests call the initialization twice. I could not work around this, any ideas?
I am using kvsession in a flask app and it works as expected. I ran into this while running tests:
It somehow happens because the tests call the initialization twice. I could not work around this, any ideas?