Skip to content

Backend: fix make test warnings #68

Description

@Chouffe
tests/endpoints/test_source_apis.py::test_list_source_apis_deduplication
  /app/app/api/api_v1/endpoints/source_apis.py:33: DeprecationWarning:
          🚨 You probably want to use `session.exec()` instead of `session.execute()`.

          This is the original SQLAlchemy `session.execute()` method that returns objects
          of type `Row`, and that you have to call `scalars()` to get the model objects.

          For example:

          ```Python
          heroes = await session.execute(select(Hero)).scalars().all()
          ```

          instead you could use `exec()`:

          ```Python
          heroes = await session.exec(select(Hero)).all()
          ```

    result = await session.execute(query)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions