Example #1
0
    def test_get_all_tables_err(self):

        try:
            constants.SELECT_ALL_TABLES_SQL = 'no_exists_file'
            dbUtil.get_all_tables(self.conn)
        finally:
            constants.SELECT_ALL_TABLES_SQL = "sql/select_all_tables.sql"
Example #2
0
    def test_get_all_tables_no_table(self):

        expected = []
        constants.SELECT_ALL_TABLES_SQL = 'sql/select_all_tables_no_table.sql'
        actual = dbUtil.get_all_tables(self.conn)

        eq_(actual, expected)

        constants.SELECT_ALL_TABLES_SQL = "sql/select_all_tables.sql"
Example #3
0
    def test_get_all_tables(self):

        expected = ['test_table']
        actual = dbUtil.get_all_tables(self.conn)

        eq_(actual, expected)