]> rtime.felk.cvut.cz Git - hubacji1/coffee-getter.git/commitdiff
Add config UT
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Wed, 20 Mar 2019 09:19:53 +0000 (10:19 +0100)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Wed, 20 Mar 2019 09:27:24 +0000 (10:27 +0100)
ut/test_conf.py [new file with mode: 0644]

diff --git a/ut/test_conf.py b/ut/test_conf.py
new file mode 100644 (file)
index 0000000..7c8dffb
--- /dev/null
@@ -0,0 +1,17 @@
+# -*- coding: utf-8 -*-
+"""Test getting configuration."""
+from unittest import TestCase
+from cbconf import Conf
+
+class LoadConfig(TestCase):
+    def test_conf_exists(self):
+        c = Conf()
+        self.assertIsNotNone(c.conf)
+
+    def test_coffebot_url(self):
+        c = Conf()
+        self.assertIn("https://hooks.slack.com/services/", c.getCoffeebotURL())
+
+    def test_db_url(self):
+        c = Conf()
+        self.assertIn(".db", c.getCoffeeDbPath())