Пример #1
0
    def test_list_tables(self):
        res = db.list_tables(TEST_DB)
        self.assertEqual(res, [], 'list_tables should be empty at this stage')

        self.conn.execute(TEST_TABLESQL)
        res = db.list_tables(TEST_DB)
        self.assertEqual(
            res, [TEST_TABLE],
            'list_tables should only include TEST_TABLE at this stage')
Пример #2
0
    def test_list_tables(self):
        res = db.list_tables(TEST_DB)
        self.assertEqual(res, [],
            'list_tables should be empty at this stage')

        self.conn.execute(TEST_TABLESQL)
        res = db.list_tables(TEST_DB)
        self.assertEqual(res, [TEST_TABLE],
            'list_tables should only include TEST_TABLE at this stage')
Пример #3
0
    def test_list_tables(self):
        assert 'schema_table' in db.list_tables()

        db.remove()
        assert_eq(db.list_tables(), [])
Пример #4
0
 def get(self, database):
     try:
         self.write(dumps(db.list_tables(database)))
     except db.NoSuchDatabase:
         raise HTTPError(404)
Пример #5
0
 def get(self, database):
     try:
         self.write(dumps(db.list_tables(database)))
     except db.NoSuchDatabase:
         raise HTTPError(404)