File: test_config.py

package info (click to toggle)
python-stetl 1.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 89,988 kB
  • sloc: python: 5,007; xml: 707; sql: 430; makefile: 155; sh: 50
file content (24 lines) | stat: -rw-r--r-- 636 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# testing: to be called by nosetests

import os

from stetl.etl import ETL
from tests.stetl_test_case import StetlTestCase


class ConfigTest(StetlTestCase):
    """Basic configuration tests"""

    def setUp(self):
        super(ConfigTest, self).setUp()

        # Initialize Stetl
        curr_dir = os.path.dirname(os.path.realpath(__file__))
        cfg_dict = {'config_file': os.path.join(curr_dir, 'configs/copy_in_out.cfg')}
        self.etl = ETL(cfg_dict)

    def test_type(self):
        self.assertEqual(self.etl.configdict.get('etl', 'chains'), 'input_xml_file|output_std')

    def test_run(self):
        self.etl.run()