Package openid :: Package test :: Module storetest
[frames] | no frames]

Module storetest

source code

Functions
 
generateHandle(n) source code
 
getTmpDbName() source code
 
testStore(store)
Make sure a given store has a minimum of API compliance.
source code
 
test_filestore() source code
 
test_sqlite() source code
 
test_mysql() source code
 
test_postgresql()
Tests the PostgreSQLStore on a locally-hosted PostgreSQL database cluster, version 7.4 or later.
source code
 
test_memstore() source code
 
pyUnitTests() source code
Variables
  db_host = 'dbtest'
  allowed_handle = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGH...
  test_functions = [test_filestore, test_sqlite, test_mysql, tes...
  c = '\x0c'
Function Details

testStore(store)

source code 

Make sure a given store has a minimum of API compliance. Call this function with an empty store.

Raises AssertionError if the store does not work as expected.

OpenIDStore -> NoneType

test_postgresql()

source code 

Tests the PostgreSQLStore on a locally-hosted PostgreSQL database
cluster, version 7.4 or later.  To run this test, you must have:

- The 'psycopg' python module (version 1.1) installed

- PostgreSQL running locally

- An 'openid_test' user account in your database cluster, which
  you can create by running 'createuser -Ad openid_test' as the
  'postgres' user

- Trust auth for the 'openid_test' account, which you can activate
  by adding the following line to your pg_hba.conf file:

  local all openid_test trust

This test connects to the database cluster three times:

- To the 'template1' database, to create the test database

- To the test database, to run the store tests

- To the 'template1' database once more, to drop the test database


Variables Details

allowed_handle

Value:
'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\\
'()*+,-./:;<=>?@[\\]^_`{|}~'

test_functions

Value:
[test_filestore, test_sqlite, test_mysql, test_postgresql, test_memsto\
re,]