#NEWLINE# def test_session_key_migration( self ) : #NEWLINE# #INDENT# conf = config . new ( { #NEWLINE# #INDENT# 'general' : { #NEWLINE# #INDENT# 'dbpath' : '/dev/null' , #NEWLINE# 'max-age' : '1h' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# conf . set ( 'general' , 'session-key' , 'supersecretkey' ) #NEWLINE# with sqlite3 . connect ( self . path ) as con : #NEWLINE# #INDENT# con . execute ( 'PRAGMA user_version = 1' ) #NEWLINE# con . execute ( 'CREATE TABLE threads (id INTEGER PRIMARY KEY)' ) #NEWLINE# #UNINDENT# db = SQLite3 ( con . path , conf ) #NEWLINE# self . assertEqual ( db . version , SQLite3 . MAX_VERSION ) #NEWLINE# self . assertEqual ( db . preferences . get ( 'session-key' ) , conf . get ( 'general' , 'session-key' ) ) #NEWLINE# conf . remove_option ( 'general' , 'session-key' ) #NEWLINE# db = SQLite3 ( self . path , conf ) #NEWLINE# self . assertEqual ( db . version , SQLite3 . MAX_VERSION ) #NEWLINE# self . assertEqual ( db . preferences . get ( 'session-key' ) , 'supersecretkey' )