From d7c60d52cfb8da8acb43640a673b7b5662f5893c Mon Sep 17 00:00:00 2001 From: Jiri Vlasak Date: Fri, 4 Nov 2022 13:36:07 +0100 Subject: [PATCH] Rework conf ut --- ut/test_conf.py | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/ut/test_conf.py b/ut/test_conf.py index 7c8dffb..b19aa04 100644 --- a/ut/test_conf.py +++ b/ut/test_conf.py @@ -1,17 +1,9 @@ -# -*- coding: utf-8 -*- -"""Test getting configuration.""" from unittest import TestCase -from cbconf import Conf +import coffee_getter.conf as 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()) +class Configuration(TestCase): + def test_config_exists(self): + assert len(conf.TESTCOFFEEBOT_SLACK_URL) > 0 + assert len(conf.COFFEEBOT_SLACK_URL) > 0 + assert len(conf.DB_PATH) > 0 -- 2.39.2