Skip to content

Commit

Permalink
fix SODAR_API setting requirement in tests (#1495)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Sep 30, 2024
1 parent e239917 commit e809807
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 6 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ Changelog for the **SODAR Core** Django app package. Loosely follows the
`Keep a Changelog <http://keepachangelog.com/en/1.0.0/>`_ guidelines.


Unreleased
==========

Fixed
-----

- **Projectroles**
- Deprecated ``SODAR_API_*`` settings required in tests (#1495)


v1.0.2 (2024-09-09)
===================

Expand Down
6 changes: 3 additions & 3 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,9 @@ def set_logging(level=None):

# SODAR API settings
# DEPRECATED: To be removed in SODAR Core v1.1 (see #1401)
SODAR_API_DEFAULT_VERSION = '0.1'
SODAR_API_ALLOWED_VERSIONS = [SODAR_API_DEFAULT_VERSION]
SODAR_API_MEDIA_TYPE = 'application/your.application+json'
# SODAR_API_DEFAULT_VERSION = '0.1'
# SODAR_API_ALLOWED_VERSIONS = [SODAR_API_DEFAULT_VERSION]
# SODAR_API_MEDIA_TYPE = 'application/your.application+json'
# SODAR API host URL
SODAR_API_DEFAULT_HOST = env.url(
'SODAR_API_DEFAULT_HOST', 'http://0.0.0.0:8000'
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# The short X.Y version
version = '1.0'
# The full version, including alpha/beta/rc tags
release = '1.0.2'
release = '1.0.3-WIP'


# -- General configuration ---------------------------------------------------
Expand Down
9 changes: 9 additions & 0 deletions docs/source/major_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ older SODAR Core version. For a complete list of changes in current and previous
releases, see the :ref:`full changelog<changelog>`.


v1.0.3 (WIP)
************

Release Highlights
==================

- Fix requiring deprecated SODAR API settings in tests


v1.0.2 (2024-09-09)
*******************

Expand Down
8 changes: 6 additions & 2 deletions projectroles/tests/test_views_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
REMOTE_SITE_SECRET,
)
from projectroles.utils import build_secret
from projectroles.views_api import (
SODAR_API_MEDIA_TYPE, # TODO: Remove in v1.1 (see #1401)
SODAR_API_DEFAULT_VERSION, # TODO: Remove in v1.1 (see #1401)
)


app_settings = AppSettingAPI()
Expand Down Expand Up @@ -129,8 +133,8 @@ class SODARAPIViewTestMixin(SerializedObjectMixin):
# Default API header parameters are for external SODAR site APIs
# DEPRECATED: To be removed in SODAR Core v1.1 (see #1401)
# Instead, provide a media type and version specific to your app
media_type = settings.SODAR_API_MEDIA_TYPE
api_version = settings.SODAR_API_DEFAULT_VERSION
media_type = SODAR_API_MEDIA_TYPE
api_version = SODAR_API_DEFAULT_VERSION

# Copied from Knox tests
@classmethod
Expand Down

0 comments on commit e809807

Please sign in to comment.