Skip to content

Commit

Permalink
Release v3.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kingosticks committed Dec 7, 2022
2 parents afe5554 + aa3f5f6 commit 7159dfa
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ This changelog is used to track all major changes to Mopidy.
For older releases, see :ref:`history`.


v3.4.1 (2022-12-07)
===================

- HTTP: Fix non-optional ``allowed_origins`` config setting. (PR: :issue:`2066`)


v3.4.0 (2022-11-28)
===================

Expand Down
1 change: 1 addition & 0 deletions mopidy/http/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def get_config_schema(self):
schema["static_dir"] = config_lib.Deprecated()
schema["zeroconf"] = config_lib.String(optional=True)
schema["allowed_origins"] = config_lib.List(
optional=True,
unique=True,
subtype=config_lib.String(transformer=lambda x: x.lower()),
)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = Mopidy
version = 3.4.0
version = 3.4.1
url = https://mopidy.com/
project_urls =
Documentation = https://docs.mopidy.com/
Expand Down
35 changes: 35 additions & 0 deletions tests/http/test_extension.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from mopidy import config as config_lib
from mopidy.http import Extension


def test_get_default_config():
ext = Extension()

config = ext.get_default_config()

assert "[http]" in config
assert "enabled = true" in config


def test_get_config_schema():
ext = Extension()

schema = ext.get_config_schema()

assert "enabled" in schema
assert "hostname" in schema
assert "port" in schema
assert "zeroconf" in schema
assert "allowed_origins" in schema
assert "csrf_protection" in schema
assert "default_app" in schema


def test_default_config_is_valid():
ext = Extension()

config = ext.get_default_config()
schema = ext.get_config_schema()
_, errors = config_lib.load([], [schema], [config], [])

assert errors.get("http") is None

0 comments on commit 7159dfa

Please sign in to comment.