core: Test version property, fix typo in changelog
This commit is contained in:
parent
77dd40b3d0
commit
3859448e06
@ -9,8 +9,8 @@ v0.18.0 (UNRELEASED)
|
||||
|
||||
**Core API**
|
||||
|
||||
- Expose :meth:`mopidy.core.Core.get_version` to HTTP clients for managing
|
||||
compatability between API versions. (Fixes: :issue:`597`)
|
||||
- Expose :meth:`mopidy.core.Core.version` for HTTP clients to manage
|
||||
compatibility between API versions. (Fixes: :issue:`597`)
|
||||
|
||||
**Pluggable local libraries**
|
||||
|
||||
|
||||
@ -57,6 +57,12 @@ class Core(pykka.ThreadingActor, AudioListener, BackendListener):
|
||||
uri_schemes = property(get_uri_schemes)
|
||||
"""List of URI schemes we can handle"""
|
||||
|
||||
def get_version(self):
|
||||
return versioning.get_version()
|
||||
|
||||
version = property(get_version)
|
||||
"""Version of the Mopidy core API"""
|
||||
|
||||
def reached_end_of_stream(self):
|
||||
self.playback.on_end_of_track()
|
||||
|
||||
@ -76,12 +82,6 @@ class Core(pykka.ThreadingActor, AudioListener, BackendListener):
|
||||
# Forward event from backend to frontends
|
||||
CoreListener.send('playlists_loaded')
|
||||
|
||||
def get_version(self):
|
||||
return versioning.get_version()
|
||||
|
||||
version = property(get_version)
|
||||
"""Version of the Mopidy core API"""
|
||||
|
||||
|
||||
class Backends(list):
|
||||
def __init__(self, backends):
|
||||
|
||||
@ -6,6 +6,7 @@ import unittest
|
||||
import pykka
|
||||
|
||||
from mopidy.core import Core
|
||||
from mopidy.utils import versioning
|
||||
|
||||
|
||||
class CoreActorTest(unittest.TestCase):
|
||||
@ -54,3 +55,6 @@ class CoreActorTest(unittest.TestCase):
|
||||
{'dummy1': self.backend1})
|
||||
self.assertEqual(core.backends.with_library,
|
||||
{'dummy1': self.backend2})
|
||||
|
||||
def test_version(self):
|
||||
self.assertEqual(self.core.version, versioning.get_version())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user