Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
* remove unused imports

* add nitpick_ignore

* apply deprecation warnings for sphinx 8 in sphinx 7

* initialize InvenioI18N for tests
  • Loading branch information
utnapischtim committed May 18, 2023
1 parent c5f2b63 commit 2ed56e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
14 changes: 8 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@

"""Sphinx configuration."""

from __future__ import print_function

import sys

import sphinx.environment

from invenio_oauth2server import __version__

# Plug example application into module path
Expand All @@ -39,6 +35,12 @@
"sphinx.ext.viewcode",
]

nitpick_ignore = [
("py:class", "t.ClassVar"),
("py:class", "Query"),
("py:attr", "query_class"),
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

Expand All @@ -55,7 +57,7 @@

# General information about the project.
project = "Invenio-OAuth2Server"
copyright = "2017, CERN"
copyright = "2023, CERN"
author = "CERN"

# The version info for the project you're documenting, acts as replacement for
Expand Down Expand Up @@ -327,7 +329,7 @@

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"https://docs.python.org/": None,
"python": ("https://docs.python.org/", None),
"flask": ("https://flask.palletsprojects.com", None),
}

Expand Down
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from invenio_accounts.models import User
from invenio_accounts.views import blueprint as accounts_blueprint
from invenio_db import InvenioDB, db
from invenio_i18n import Babel
from invenio_i18n import Babel, InvenioI18N
from six import get_method_self
from sqlalchemy_utils.functions import create_database, database_exists, drop_database

Expand Down Expand Up @@ -92,6 +92,7 @@ def init_app(app):
Breadcrumbs(app)
InvenioDB(app)
InvenioOAuth2Server(app)
InvenioI18N(app)

api_app = Flask("testapiapp", instance_path=instance_path)
api_app.config.update(APPLICATION_ROOT="/api", ACCOUNTS_REGISTER_BLUEPRINT=True)
Expand Down

0 comments on commit 2ed56e2

Please sign in to comment.