# Path: main.py
# def get_root_path():
#     """
# 
#     :rtype : object
#     """
#     import os
#     path = os.path.dirname(__file__)
#     path = path.replace('\\', '/')
#     path = path[0: path.rfind('/')]
#     return path


import unittest
from tests.unit_tests_rob import _domain_rob
from tests.unit_tests_rob.global_test_suite import test_system_config, get_global_test_pipeline, execute_sql, init_db
from tests.unit_tests_rob.mappings_rob_hybridlinks import init_source_to_sor_mappings, init_sor_to_dv_mappings
from tests.unit_tests_rob.test05r_process import test_row_count, get_field_value_from_table, \
    get_field_value_from_dv_table
from main import get_root_path
        self.pipe.mappings = []
        self.pipe.mappings.extend(init_source_to_sor_mappings())
        pipe = self.pipe
        self.pipe.mappings.extend(init_sor_to_dv_mappings(pipe))

    def test01_pipeline_run(self):

        print("test_run1:\n")
        self.pipeline.run()

        test_row_count(self, 'sor_test_system.zorgverlener_hstage', 4)
        test_row_count(self, 'dv.zorgverlener_hub', 4)
        test_row_count(self, 'dv.zorgverlener_sat', 4)
        test_row_count(self, 'dv.zorgverlener_sat_personalia', 4)
        test_row_count(self, 'dv.zorgverlener_adres_link', 12)
        test_row_count(self, 'dv.adres_sat', 12)

    def test02_pipeline_rerun(self):
        print("test_run1_her:\n")
        self.pipeline.run()

        test_row_count(self, 'sor_test_system.zorgverlener_hstage', 4)
        test_row_count(self, 'dv.zorgverlener_hub', 4)
        test_row_count(self, 'dv.zorgverlener_sat', 4)
        test_row_count(self, 'dv.zorgverlener_sat_personalia', 4)
        test_row_count(self, 'dv.zorgverlener_adres_link', 12)
        test_row_count(self, 'dv.adres_sat', 12)

    def test03_dv_updates(self):


# Path: main.py
# def get_root_path():
#     """
# 
#     :rtype : object
#     """
#     import os
#     path = os.path.dirname(__file__)
#     path = path.replace('\\', '/')
#     path = path[0: path.rfind('/')]
#     return path


# Path: tests/old/unit_tests_rob/test06r_hybridlinks.py
import unittest
from tests.unit_tests_rob import _domain_rob
from tests.unit_tests_rob.global_test_suite import test_system_config, get_global_test_pipeline, execute_sql, init_db
from tests.unit_tests_rob.mappings_rob_hybridlinks import init_source_to_sor_mappings, init_sor_to_dv_mappings
from tests.unit_tests_rob.test05r_process import test_row_count, get_field_value_from_table, \
    get_field_value_from_dv_table
from main import get_root_path

        self.pipe.mappings = []
        self.pipe.mappings.extend(init_source_to_sor_mappings())
        pipe = self.pipe
        self.pipe.mappings.extend(init_sor_to_dv_mappings(pipe))

    def test01_pipeline_run(self):

        print("test_run1:\n")
        self.pipeline.run()

        test_row_count(self, 'sor_test_system.zorgverlener_hstage', 4)
        test_row_count(self, 'dv.zorgverlener_hub', 4)
        test_row_count(self, 'dv.zorgverlener_sat', 4)
        test_row_count(self, 'dv.zorgverlener_sat_personalia', 4)
        test_row_count(self, 'dv.zorgverlener_adres_link', 12)
        test_row_count(self, 'dv.adres_sat', 12)

    def test02_pipeline_rerun(self):
        print("test_run1_her:\n")
        self.pipeline.run()

        test_row_count(self, 'sor_test_system.zorgverlener_hstage', 4)
        test_row_count(self, 'dv.zorgverlener_hub', 4)
        test_row_count(self, 'dv.zorgverlener_sat', 4)
        test_row_count(self, 'dv.zorgverlener_sat_personalia', 4)
        test_row_count(self, 'dv.zorgverlener_adres_link', 12)
        test_row_count(self, 'dv.adres_sat', 12)

    def test03_dv_updates(self):


        self.pipe.mappings[0].file_name = get_root_path() + '/PYELT/tests/data/zorgverlenersB_rob.csv'