#NEWLINE# def test_get_database_bad( self ) : #NEWLINE# #INDENT# inst = self . instance #NEWLINE# db1 = fakes . FakeEntity ( ) #NEWLINE# db1 . name = 'a' #NEWLINE# db2 = fakes . FakeEntity ( ) #NEWLINE# db2 . name = 'b' #NEWLINE# inst . list_databases = Mock ( return_value = [ db1 , db2 ] ) #NEWLINE# self . assertRaises ( exc . NoSuchDatabase , inst . get_database , 'z' )