#NEWLINE# def test_storage( self ) : #NEWLINE# #INDENT# self . kv [ 'a' ] = 'A' #NEWLINE# self . kv [ 'b' ] = 1 #NEWLINE# self . assertEqual ( self . kv [ 'a' ] , 'A' ) #NEWLINE# self . assertEqual ( key . kv [ 'b' ] , '1' ) #NEWLINE# self . assertRaises ( KeyError , self . kv . __getitem__ , 'c' ) #NEWLINE# del self . kv [ 'a' ] #NEWLINE# self . assertRaises ( KeyError , self . kv . __getitem__ , 'a' ) #NEWLINE# self . kv [ 'a' ] = 'A' #NEWLINE# self . kv [ 'c' ] = 'C' #NEWLINE# self . assertEqual ( self . kv [ ( self . kv . key << ( 'a' , 'c' ) ) ] , [ 'A' , 'C' ] ) #NEWLINE# self . kv [ ( self . kv . key << ( 'a' , 'c' ) ) ] = 'X' #NEWLINE# self . assertEqual ( self . kv [ 'a' ] , 'X' ) #NEWLINE# self . assertEqual ( self . kv [ 'b' ] , '1' ) #NEWLINE# self . assertEqual ( self . kv [ 'c' ] , 'X' ) #NEWLINE# key = self . kv . key #NEWLINE# results = self . kv [ ( key << ( 'a' , 'b' ) ) ] #NEWLINE# self . assertEqual ( results , [ 'X' , '1' ] ) #NEWLINE# del self . kv [ ( self . kv . key << ( 'a' , 'c' ) ) ] #NEWLINE# self . assertRaises ( KeyError , self . kv . __getitem__ , 'a' ) #NEWLINE# self . assertRaises ( KeyError , self . kv . __getitem__ , 'c' ) #NEWLINE# self . assertEqual ( self . kv [ 'b' ] , '1' ) #NEWLINE# self . pickled_kv [ 'a' ] = 'A' #NEWLINE# self . pickled_kv [ 'b' ] = 1.1 #NEWLINE# self . assertEqual ( self . pickled_kv [ 'a' ] , 'A' ) #NEWLINE# self . assertEqual ( self . pickled_kv [ 'b' ] , 1.1 )