2018-10-03 18:58:50 +02:00
|
|
|
from __future__ import unicode_literals
|
2018-10-03 18:34:45 +02:00
|
|
|
|
2018-10-03 18:58:50 +02:00
|
|
|
import mopidy_funkwhale
|
2018-10-03 18:34:45 +02:00
|
|
|
|
|
|
|
|
2018-10-03 18:58:50 +02:00
|
|
|
def test_get_default_config():
|
|
|
|
ext = mopidy_funkwhale.Extension()
|
2018-10-03 18:34:45 +02:00
|
|
|
|
2018-10-03 18:58:50 +02:00
|
|
|
config = ext.get_default_config()
|
2018-10-03 18:34:45 +02:00
|
|
|
|
2018-10-04 20:57:27 +02:00
|
|
|
assert "[funkwhale]" in config
|
|
|
|
assert "enabled = true" in config
|
|
|
|
assert "url = https://demo.funkwhale.audio" in config
|
|
|
|
assert "username = demo" in config
|
|
|
|
assert "password = demo" in config
|
2018-10-03 18:34:45 +02:00
|
|
|
|
|
|
|
|
2018-10-03 18:58:50 +02:00
|
|
|
def test_get_config_schema():
|
|
|
|
ext = mopidy_funkwhale.Extension()
|
2018-10-03 18:34:45 +02:00
|
|
|
|
2018-10-03 18:58:50 +02:00
|
|
|
schema = ext.get_config_schema()
|
2018-10-04 20:57:27 +02:00
|
|
|
assert "url" in schema
|
|
|
|
assert "username" in schema
|
|
|
|
assert "password" in schema
|