pytest-invenio


Namepytest-invenio JSON
Version 2.2.0 PyPI version JSON
download
home_pagehttps://github.com/inveniosoftware/pytest-invenio
SummaryPytest fixtures for Invenio.
upload_time2024-02-28 09:11:32
maintainer
docs_urlNone
authorCERN
requires_python>=3.7
licenseMIT
keywords invenio pytest
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ..
    This file is part of pytest-invenio.
    Copyright (C) 2018 CERN.

    pytest-invenio is free software; you can redistribute it and/or modify it
    under the terms of the MIT License; see LICENSE file for more details.

================
 pytest-invenio
================

.. image:: https://github.com/inveniosoftware/pytest-invenio/workflows/CI/badge.svg
        :target: https://github.com/inveniosoftware/pytest-invenio/actions?query=workflow%3ACI

.. image:: https://img.shields.io/coveralls/inveniosoftware/pytest-invenio.svg
        :target: https://coveralls.io/r/inveniosoftware/pytest-invenio

.. image:: https://img.shields.io/pypi/v/pytest-invenio.svg
        :target: https://pypi.org/pypi/pytest-invenio

Pytest fixtures for Invenio.

The package offers a number of features to help test Invenio based
applications:

- Less boilerplate: Using the fixtures you can keep your ``conftest.py`` short
  and focused.
- Database re-use: database tests are running inside a transaction which is
  rolled back after the test.
- End-to-end testing: Selenium tests can easily be switched on/off, and in case
  of test failures a screenshot is taken (with possibility to output in the
  console in base64-encoding - useful on e.g. TravisCI).
- Application configuration for testing (e.g. disable CSRF protection in forms
  and HTTPS requirement).
- JSON decoding support in Flask test client for easier API testing.
- Batteries included: further fixtures help with e.g. mail sending and CLI
  tests.

Further documentation is available on https://pytest-invenio.readthedocs.io/.

..
    This file is part of pytest-invenio.
    Copyright (C) 2018-2024 CERN.

    pytest-invenio is free software; you can redistribute it and/or modify it
    under the terms of the MIT License; see LICENSE file for more details.

Changes
=======

Version 2.2.0 (released 2024-02-28)

- setup: bump coverage package
- installation: add GitHub action annotations

Version 2.1.7 (released 2024-01-29)

- fixtures: use unlogged tables for PostgreSQL

Version 2.1.6 (released 2023-10-31)

- Add ``db_session_options`` fixture.

Version 2.1.5 (released 2023-10-02)

- installation: pin Flask ``<2.3.0``.

Version 2.1.4 (released 2023-06-02)

- user fixture: use identity ID as int

Version 2.1.3 (released 2023-04-13)

- yanked, because of an incompatibility with Flask-SQLAlchemy v3.

Version 2.1.2 (released 2023-03-20)

- disable request rate-limiting

Version 2.1.1 (released 2022-10-25)

- pin pytest version

Version 1.4.15 (released 2022-10-04)

- Pin docker-services-cli<0.5.0, which drops Elasticsearch v6.

Version 1.4.14 (yanked)

Version 2.1.0 (released 2022-10-03)

- Adds support for OpenSearch v2

Version 2.0.0 (released 2022-09-23)

- Use invenio-search v2 and replaces Elasticsearch with OpenSearch, including
  fixture names.
- Deprecate previous fixtures named with `es` prefix.
- Remove upper pin of pytest.

Version 1.4.13 (released 2022-08-09)

- Fix pycodestyle dependency

Version 1.4.12 (released 2022-08-08)

- Fix flask-login dependency

Version 1.4.11 (released 2022-05-05)

- Upper pin Selenium dependency, v4 drops support for Python 3.7.

Version 1.4.10 (released 2022-05-04)

- Fixes an issue with the user id in the UserFixture being None before the
  db session is flushed.

Version 1.4.9 (released 2022-05-02)

- Mark users as changed and commit through datastore (outside of context
  manager).

Version 1.4.8 (yanked 2022-05-02 due to UserFixture session close issues)

- Commit users through the datastore in the UserFixture.

Version 1.4.7 (released 2022-04-04)

- Adds support for Flask v2.1

Version 1.4.6 (released 2022-02-29)

- Adds support for Invenio-Accounts 2.0 in the UserFixture.

Version 1.4.5 (released 2022-02-23)

- Fixes an import so that pytest-invenio is now usable without
  Invenio-Accounts installed.

Version 1.4.4 (released 2022-02-21)

- Adds new UserFixture for easier test user creation.

Version 1.4.3 (released 2022-02-18)

- Adds support for using importlib_metadata to read the patched entry points.

Version 1.4.2 (released 2021-05-11)

- Add APP_THEME and THEME_ICONS in default app config, often needed when testing
  invenio packages that will render templates.

Version 1.4.1 (released 2020-12-17)

- Remove pytest-celery because it's still an alpha release.

Version 1.4.0 (released 2020-09-16)

- BACKWARD INCOMPATIBLE: Changes to use isort, pycodestyle and pydocstyle via
  pytest plugins. You need to update `pytest.ini` and remove the ``--pep8``
  from the addopts and instead add ``--isort --pydocstyle --pycodestyle``:

  .. code-block:: ini

      addopts = --isort --pydocstyle --pycodestyle ...

  In `./run-tests.sh` script you should also remove calls to pydocstyle and
  isort as both are now integrated with pytest.

- BACKWARD INCOMPATIBLE: Upgrade dependencies: coverage, pytest-flask,
  check-manifest, pytest. You need to set the pytest-flask live server
  fixture scope in your pytest config:

  .. code-block:: ini

     [pytest]
     live_server_scope = function

- Decommission pytest-pep8 (last release in 2014) in favour of pycodestyle.

Version 1.3.4 (released 2020-09-15)

- Add `entrypoints` fixture to allow injecting extra entry points during
  testing so that you avoid manual registration of e.g. mappings and schemas.

Version 1.3.3 (released 2020-08-27)

- Add `docker-services-cli` as dependency to enable Invenio modules to
  perform reproducible tests.

Version 1.3.2 (released 2020-05-19)

- Move check-manifest, coverage, isort, pydocstyle, pytest-flask and
  pytest-pep8 from test to install requirements to provide them as centrally
  managed dependencies.

Version 1.3.1 (released 2020-05-12)

- Uninstalls numpy in Travis due to incompatibilities with
  elasticsearch-py.

Version 1.3.0 (released 2020-03-19)

- Removes support for Python 2.7.

Version 1.2.2 (released 2020-05-07)

- Uninstalls numpy in Travis due to incompatibilities with
  elasticsearch-py.
- Deprecated Python versions lower than 3.6.0. Now supporting 3.6.0.
- Set maximum version of Werkzeug to 1.0.0 due to incompatible imports.
- Set maximum version of Flask to 1.1.0 due to incompatible imports.
- Set maximum version of Pytest-Flask to 1.0.0 due to breaking changes.
- Set minimum version of Invenio-Search to 1.2.3 and maximum to 1.3.0.

Version 1.2.1 (released 2019-11-13)

- Fixes instance path fixture to also set the static folder.

Version 1.2.0 (released 2019-07-31)

- Adds fixture for creating default Location.
- Adds fixture for creating Bucket from directory with files.

Version 1.1.1 (released 2019-05-21)

- Adds pytest-cov as install dependency.

Version 1.1.0 (released 2019-02-15)

- Changes name of fixture from celery_config to celery_config_ext due to
  unreliable overwriting of celery_config fixture name.

Version 1.0.6 (released 2018-12-03)

- Fixes overwriting of celery_config fixture

Version 1.0.5 (released 2018-10-08)

- Adds default Content Security Policy header to the app configuration.
- Fixes issue with default tests scope.

Version 1.0.4 (released 2018-08-14)

- Bumps pytest minimun version to 3.8.0.

Version 1.0.3 (released 2018-09-05)

- Moves module dependent imports inside the fixture functions in order to
  decouple dependencies for Invenio apps or modules that might not be using
  them.

Version 1.0.2 (released 2018-05-25)

Version 1.0.1 (released 2018-04-17)

Version 1.0.0 (released 2018-03-22)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/inveniosoftware/pytest-invenio",
    "name": "pytest-invenio",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "invenio pytest",
    "author": "CERN",
    "author_email": "info@inveniosoftware.org",
    "download_url": "https://files.pythonhosted.org/packages/e8/4b/541f2175c948753ea880df9712ac3982c9d81ff51c9cea70bd3a2fee5b46/pytest-invenio-2.2.0.tar.gz",
    "platform": "any",
    "description": "..\n    This file is part of pytest-invenio.\n    Copyright (C) 2018 CERN.\n\n    pytest-invenio is free software; you can redistribute it and/or modify it\n    under the terms of the MIT License; see LICENSE file for more details.\n\n================\n pytest-invenio\n================\n\n.. image:: https://github.com/inveniosoftware/pytest-invenio/workflows/CI/badge.svg\n        :target: https://github.com/inveniosoftware/pytest-invenio/actions?query=workflow%3ACI\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/pytest-invenio.svg\n        :target: https://coveralls.io/r/inveniosoftware/pytest-invenio\n\n.. image:: https://img.shields.io/pypi/v/pytest-invenio.svg\n        :target: https://pypi.org/pypi/pytest-invenio\n\nPytest fixtures for Invenio.\n\nThe package offers a number of features to help test Invenio based\napplications:\n\n- Less boilerplate: Using the fixtures you can keep your ``conftest.py`` short\n  and focused.\n- Database re-use: database tests are running inside a transaction which is\n  rolled back after the test.\n- End-to-end testing: Selenium tests can easily be switched on/off, and in case\n  of test failures a screenshot is taken (with possibility to output in the\n  console in base64-encoding - useful on e.g. TravisCI).\n- Application configuration for testing (e.g. disable CSRF protection in forms\n  and HTTPS requirement).\n- JSON decoding support in Flask test client for easier API testing.\n- Batteries included: further fixtures help with e.g. mail sending and CLI\n  tests.\n\nFurther documentation is available on https://pytest-invenio.readthedocs.io/.\n\n..\n    This file is part of pytest-invenio.\n    Copyright (C) 2018-2024 CERN.\n\n    pytest-invenio is free software; you can redistribute it and/or modify it\n    under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion 2.2.0 (released 2024-02-28)\n\n- setup: bump coverage package\n- installation: add GitHub action annotations\n\nVersion 2.1.7 (released 2024-01-29)\n\n- fixtures: use unlogged tables for PostgreSQL\n\nVersion 2.1.6 (released 2023-10-31)\n\n- Add ``db_session_options`` fixture.\n\nVersion 2.1.5 (released 2023-10-02)\n\n- installation: pin Flask ``<2.3.0``.\n\nVersion 2.1.4 (released 2023-06-02)\n\n- user fixture: use identity ID as int\n\nVersion 2.1.3 (released 2023-04-13)\n\n- yanked, because of an incompatibility with Flask-SQLAlchemy v3.\n\nVersion 2.1.2 (released 2023-03-20)\n\n- disable request rate-limiting\n\nVersion 2.1.1 (released 2022-10-25)\n\n- pin pytest version\n\nVersion 1.4.15 (released 2022-10-04)\n\n- Pin docker-services-cli<0.5.0, which drops Elasticsearch v6.\n\nVersion 1.4.14 (yanked)\n\nVersion 2.1.0 (released 2022-10-03)\n\n- Adds support for OpenSearch v2\n\nVersion 2.0.0 (released 2022-09-23)\n\n- Use invenio-search v2 and replaces Elasticsearch with OpenSearch, including\n  fixture names.\n- Deprecate previous fixtures named with `es` prefix.\n- Remove upper pin of pytest.\n\nVersion 1.4.13 (released 2022-08-09)\n\n- Fix pycodestyle dependency\n\nVersion 1.4.12 (released 2022-08-08)\n\n- Fix flask-login dependency\n\nVersion 1.4.11 (released 2022-05-05)\n\n- Upper pin Selenium dependency, v4 drops support for Python 3.7.\n\nVersion 1.4.10 (released 2022-05-04)\n\n- Fixes an issue with the user id in the UserFixture being None before the\n  db session is flushed.\n\nVersion 1.4.9 (released 2022-05-02)\n\n- Mark users as changed and commit through datastore (outside of context\n  manager).\n\nVersion 1.4.8 (yanked 2022-05-02 due to UserFixture session close issues)\n\n- Commit users through the datastore in the UserFixture.\n\nVersion 1.4.7 (released 2022-04-04)\n\n- Adds support for Flask v2.1\n\nVersion 1.4.6 (released 2022-02-29)\n\n- Adds support for Invenio-Accounts 2.0 in the UserFixture.\n\nVersion 1.4.5 (released 2022-02-23)\n\n- Fixes an import so that pytest-invenio is now usable without\n  Invenio-Accounts installed.\n\nVersion 1.4.4 (released 2022-02-21)\n\n- Adds new UserFixture for easier test user creation.\n\nVersion 1.4.3 (released 2022-02-18)\n\n- Adds support for using importlib_metadata to read the patched entry points.\n\nVersion 1.4.2 (released 2021-05-11)\n\n- Add APP_THEME and THEME_ICONS in default app config, often needed when testing\n  invenio packages that will render templates.\n\nVersion 1.4.1 (released 2020-12-17)\n\n- Remove pytest-celery because it's still an alpha release.\n\nVersion 1.4.0 (released 2020-09-16)\n\n- BACKWARD INCOMPATIBLE: Changes to use isort, pycodestyle and pydocstyle via\n  pytest plugins. You need to update `pytest.ini` and remove the ``--pep8``\n  from the addopts and instead add ``--isort --pydocstyle --pycodestyle``:\n\n  .. code-block:: ini\n\n      addopts = --isort --pydocstyle --pycodestyle ...\n\n  In `./run-tests.sh` script you should also remove calls to pydocstyle and\n  isort as both are now integrated with pytest.\n\n- BACKWARD INCOMPATIBLE: Upgrade dependencies: coverage, pytest-flask,\n  check-manifest, pytest. You need to set the pytest-flask live server\n  fixture scope in your pytest config:\n\n  .. code-block:: ini\n\n     [pytest]\n     live_server_scope = function\n\n- Decommission pytest-pep8 (last release in 2014) in favour of pycodestyle.\n\nVersion 1.3.4 (released 2020-09-15)\n\n- Add `entrypoints` fixture to allow injecting extra entry points during\n  testing so that you avoid manual registration of e.g. mappings and schemas.\n\nVersion 1.3.3 (released 2020-08-27)\n\n- Add `docker-services-cli` as dependency to enable Invenio modules to\n  perform reproducible tests.\n\nVersion 1.3.2 (released 2020-05-19)\n\n- Move check-manifest, coverage, isort, pydocstyle, pytest-flask and\n  pytest-pep8 from test to install requirements to provide them as centrally\n  managed dependencies.\n\nVersion 1.3.1 (released 2020-05-12)\n\n- Uninstalls numpy in Travis due to incompatibilities with\n  elasticsearch-py.\n\nVersion 1.3.0 (released 2020-03-19)\n\n- Removes support for Python 2.7.\n\nVersion 1.2.2 (released 2020-05-07)\n\n- Uninstalls numpy in Travis due to incompatibilities with\n  elasticsearch-py.\n- Deprecated Python versions lower than 3.6.0. Now supporting 3.6.0.\n- Set maximum version of Werkzeug to 1.0.0 due to incompatible imports.\n- Set maximum version of Flask to 1.1.0 due to incompatible imports.\n- Set maximum version of Pytest-Flask to 1.0.0 due to breaking changes.\n- Set minimum version of Invenio-Search to 1.2.3 and maximum to 1.3.0.\n\nVersion 1.2.1 (released 2019-11-13)\n\n- Fixes instance path fixture to also set the static folder.\n\nVersion 1.2.0 (released 2019-07-31)\n\n- Adds fixture for creating default Location.\n- Adds fixture for creating Bucket from directory with files.\n\nVersion 1.1.1 (released 2019-05-21)\n\n- Adds pytest-cov as install dependency.\n\nVersion 1.1.0 (released 2019-02-15)\n\n- Changes name of fixture from celery_config to celery_config_ext due to\n  unreliable overwriting of celery_config fixture name.\n\nVersion 1.0.6 (released 2018-12-03)\n\n- Fixes overwriting of celery_config fixture\n\nVersion 1.0.5 (released 2018-10-08)\n\n- Adds default Content Security Policy header to the app configuration.\n- Fixes issue with default tests scope.\n\nVersion 1.0.4 (released 2018-08-14)\n\n- Bumps pytest minimun version to 3.8.0.\n\nVersion 1.0.3 (released 2018-09-05)\n\n- Moves module dependent imports inside the fixture functions in order to\n  decouple dependencies for Invenio apps or modules that might not be using\n  them.\n\nVersion 1.0.2 (released 2018-05-25)\n\nVersion 1.0.1 (released 2018-04-17)\n\nVersion 1.0.0 (released 2018-03-22)\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Pytest fixtures for Invenio.",
    "version": "2.2.0",
    "project_urls": {
        "Homepage": "https://github.com/inveniosoftware/pytest-invenio"
    },
    "split_keywords": [
        "invenio",
        "pytest"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "73a943a9694b623f36b38990da3f96e6768b7a7ead163baca2f164707a9652f2",
                "md5": "afa4bbd9301b7a5eabac396da4b71818",
                "sha256": "29a131e785686c836c6d7be04e10c7b6345d0ca6996e3fe719d670bc3e70b8c6"
            },
            "downloads": -1,
            "filename": "pytest_invenio-2.2.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "afa4bbd9301b7a5eabac396da4b71818",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 23400,
            "upload_time": "2024-02-28T09:11:30",
            "upload_time_iso_8601": "2024-02-28T09:11:30.736382Z",
            "url": "https://files.pythonhosted.org/packages/73/a9/43a9694b623f36b38990da3f96e6768b7a7ead163baca2f164707a9652f2/pytest_invenio-2.2.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e84b541f2175c948753ea880df9712ac3982c9d81ff51c9cea70bd3a2fee5b46",
                "md5": "639674b21e03a37dea1c4c7743a7d36b",
                "sha256": "4b896567ef67234331e794168fee12d13e4d4d1743ad912cd099772977aa0e98"
            },
            "downloads": -1,
            "filename": "pytest-invenio-2.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "639674b21e03a37dea1c4c7743a7d36b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 40026,
            "upload_time": "2024-02-28T09:11:32",
            "upload_time_iso_8601": "2024-02-28T09:11:32.167478Z",
            "url": "https://files.pythonhosted.org/packages/e8/4b/541f2175c948753ea880df9712ac3982c9d81ff51c9cea70bd3a2fee5b46/pytest-invenio-2.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-28 09:11:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "inveniosoftware",
    "github_project": "pytest-invenio",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pytest-invenio"
}
        
Elapsed time: 0.23057s