File: test_extension.py

package info (click to toggle)
mopidy-beets 4.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 224 kB
  • sloc: python: 627; makefile: 3
file content (28 lines) | stat: -rw-r--r-- 705 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from __future__ import unicode_literals

import unittest

from mopidy_beets import BeetsExtension


class ExtensionTest(unittest.TestCase):
    def test_get_default_config(self):
        ext = BeetsExtension()

        config = ext.get_default_config()

        self.assertIn("[beets]", config)
        self.assertIn("enabled = true", config)
        self.assertIn("hostname = 127.0.0.1", config)
        self.assertIn("port = 8337", config)

    def test_get_config_schema(self):
        ext = BeetsExtension()

        schema = ext.get_config_schema()

        self.assertIn("enabled", schema)
        self.assertIn("hostname", schema)
        self.assertIn("port", schema)

    # TODO Write more tests