Ejemplo n.º 1
0
def test_returns_data(test_gdb):
    hashes = _get_hashes([str(Path(test_gdb) / 'ChangeDetection')])
    expected = {'update_tests.dbo.counties': '1',
                'update_tests.dbo.providers': '2',
                'counties': '5'}

    assert hashes == expected
    def test_returns_data(self):
        hashes = _get_hashes([path.join(test_fgdb, 'ChangeDetection')])
        expected = {
            'update_tests.dbo.counties': '1',
            'update_tests.dbo.providers': '2',
            'counties': '5'
        }

        self.assertEqual(hashes, expected)
Ejemplo n.º 3
0
def test_throw_on_bad_path(test_gdb):
    tables = ['ChangeDetection', 'BadPath']

    with raises(Exception):
        assert _get_hashes([str(Path(test_gdb) / table) for table in tables])
Ejemplo n.º 4
0
def test_throw_on_duplicate_table_name(test_gdb):
    tables = ['ChangeDetection', 'ChangeDetectionWithDup']

    with raises(Exception):
        assert _get_hashes([str(Path(test_gdb) / table) for table in tables])
    def test_throw_on_bad_path(self):
        tables = ['ChangeDetection', 'BadPath']

        with raises(Exception):
            assert _get_hashes(
                [path.join(test_fgdb, table) for table in tables])
    def test_throw_on_duplicate_table_name(self):
        tables = ['ChangeDetection', 'ChangeDetectionWithDup']

        with raises(Exception):
            assert _get_hashes(
                [path.join(test_fgdb, table) for table in tables])