Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
sqlite3.test.userfunctions.AuthorizerTests Class Reference

List of all members.

Public Member Functions

def setUp
def tearDown
def CheckTableAccess
def CheckColumnAccess

Public Attributes

 con

Detailed Description

Definition at line 367 of file userfunctions.py.


Member Function Documentation

Definition at line 394 of file userfunctions.py.

00394 
00395     def CheckColumnAccess(self):
00396         try:
00397             self.con.execute("select c2 from t1")
00398         except sqlite.DatabaseError as e:
00399             if not e.args[0].endswith("prohibited"):
00400                 self.fail("wrong exception text: %s" % e.args[0])
00401             return
00402         self.fail("should have raised an exception due to missing privileges")

Here is the call graph for this function:

Definition at line 385 of file userfunctions.py.

00385 
00386     def CheckTableAccess(self):
00387         try:
00388             self.con.execute("select * from t2")
00389         except sqlite.DatabaseError as e:
00390             if not e.args[0].endswith("prohibited"):
00391                 self.fail("wrong exception text: %s" % e.args[0])
00392             return
00393         self.fail("should have raised an exception due to missing privileges")

Here is the call graph for this function:

Definition at line 368 of file userfunctions.py.

00368 
00369     def setUp(self):
00370         self.con = sqlite.connect(":memory:")
00371         self.con.executescript("""
00372             create table t1 (c1, c2);
00373             create table t2 (c1, c2);
00374             insert into t1 (c1, c2) values (1, 2);
00375             insert into t2 (c1, c2) values (4, 5);
00376             """)
00377 
00378         # For our security test:
00379         self.con.execute("select c2 from t2")
00380 
00381         self.con.set_authorizer(authorizer_cb)

Here is the caller graph for this function:

Definition at line 382 of file userfunctions.py.

00382 
00383     def tearDown(self):
00384         pass

Here is the caller graph for this function:


Member Data Documentation

Definition at line 369 of file userfunctions.py.


The documentation for this class was generated from the following file: