#NEWLINE# def test_add_from_db_name_without_options_passed( self ) : #NEWLINE# #INDENT# db_name = 'testdb' #NEWLINE# default_db_options = DatabaseOptions ( ) #NEWLINE# ( status , content ) = self . handler . add ( db_name ) #NEWLINE# self . assertEqual ( status , SUCCESS_STATUS ) #NEWLINE# self . assertEqual ( content , None ) #NEWLINE# store_datas = json . load ( open ( self . handler . store_file , 'r' ) ) #NEWLINE# self . assertIn ( db_name , store_datas ) #NEWLINE# self . assertEqual ( store_datas [ db_name ] [ 'path' ] , os . path . join ( self . dest , db_name ) ) #NEWLINE# self . assertIsNotNone ( store_datas [ db_name ] [ 'uid' ] ) #NEWLINE# stored_db_options = stored_db_options [ db_name ] [ 'options' ] #NEWLINE# self . assertIsNotNone ( stored_db_options ) #NEWLINE# self . assertIsInstance ( stored_db_options , dict ) #NEWLINE# for ( option_name , option_value ) in default_db_options . iteritems ( ) : #NEWLINE# #INDENT# self . assertIn ( option_name , stored_db_options ) #NEWLINE# self . assertEqual ( option_value , stored_db_options [ option_name ] )