From: Jiri Vlasak Date: Wed, 20 Mar 2019 09:19:53 +0000 (+0100) Subject: Add config UT X-Git-Tag: v0.1.0~10^2~2 X-Git-Url: https://rtime.felk.cvut.cz/gitweb/hubacji1/coffee-getter.git/commitdiff_plain/1563803410a045d1415425c708fdeae83675a829 Add config UT --- diff --git a/ut/test_conf.py b/ut/test_conf.py new file mode 100644 index 0000000..7c8dffb --- /dev/null +++ b/ut/test_conf.py @@ -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())