Changeset 709 for trunk/module/tests


Ignore:
Timestamp:
Jan 10, 2016, 5:12:03 PM (4 years ago)
Author:
cito
Message:

get_tables() should not list the information schema tables

Since get_tables() does not return the other system tables starting with pg_,
so it should not return the information schema tables either.

Also removed an ancient check for tables starting with Inv
that is not relevant any more since PostgreSQL 7.1 or so.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/module/tests/test_classic_dbwrapper.py

    r706 r709  
    596596        get_tables = self.db.get_tables
    597597        result1 = get_tables()
     598        self.assertIsInstance(result1, list)
     599        for t in result1:
     600            t = t.split('.', 1)
     601            self.assertGreaterEqual(len(t), 2)
     602            if len(t) > 2:
     603                self.assertTrue(t[1].startswith('"'))
     604            t = t[0]
     605            self.assertNotEqual(t, 'information_schema')
     606            self.assertFalse(t.startswith('pg_'))
    598607        tables = ('"A very Special Name"',
    599608            '"A_MiXeD_quoted_NaMe"', 'a1', 'a2',
Note: See TracChangeset for help on using the changeset viewer.