File: test_config.py

package info (click to toggle)
python-ttls 1.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 168 kB
  • sloc: python: 1,043; makefile: 8
file content (14 lines) | stat: -rw-r--r-- 397 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import unittest

from ttls.client import Twinkly


class TestTwinklyConfig(unittest.TestCase):
    def setUp(self):
        self.client = Twinkly(host="192.0.2.1")

    def test_set_default_mode(self):
        self.client.default_mode = "movie"
        self.assertEqual(self.client.default_mode, "movie")
        with self.assertRaises(ValueError):
            self.client.default_mode = "b0rken"