This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
md-pdf/tests/test_config.py

16 lines
498 B
Python
Raw Normal View History

2017-05-27 20:32:50 +01:00
from tests import BaseTestCase
from md_pdf.config import read, validate
from md_pdf.exceptions import ConfigValidationException
import os
class ReadConfigTestCase(BaseTestCase):
def test_reads_config(self):
config = read.load_config(os.path.abspath('test-files/mdp.yml'))
self.assertIsInstance(config, dict)
def test_throws_at_missing_config(self):
with self.assertRaises(ConfigValidationException):
read.load_config(os.path.abspath('non-existant'))