pytest-flask-sqlalchemy icon indicating copy to clipboard operation
pytest-flask-sqlalchemy copied to clipboard

Get reflection working for SA 1.4

Open fgregg opened this issue 4 years ago • 1 comments
trafficstars

Working on getting reflection for SA 1.4, will close #55

Also adds an mocked patch for execution_options

This would be cleaner and more specific if it was like

    class EngineMock(mocker.MagicMock):
        pass
    engine = EngineMock(spec=sa.engine.Engine)
    ...
    if version.parse(sa.__version__) >= version.parse('1.4'):
        sa.inspection._registrars[EngineMock] = sa.engine.Inspector._engine_insp

but, somehow subclassing MagicMock like this interferes with the tests from running.

fgregg avatar Sep 24 '21 20:09 fgregg

First need to figure out why tests are not passing. Probably should remove cybergrind's code and isolate what i'm working with.

It was trying to subclass mocker.MagicMock to EngineMock.

fgregg avatar Sep 24 '21 20:09 fgregg