#NEWLINE# def test_stock_on_hand_overstocked( self ) : #NEWLINE# #INDENT# with localize ( 'sw' ) : #NEWLINE# #INDENT# reminder_trans = unicode ( REMINDER_TRANS ) #NEWLINE# soh_overstocked = unicode ( SOH_OVERSTOCKED ) #NEWLINE# #UNINDENT# script = ( '\n            5551234 > Hmk Id 400 Dp 900 Ip 678\n            5551234 < %(reminder_trans)s\n        ' % { #NEWLINE# #INDENT# 'reminder_trans' : reminder_trans , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . run_script ( script ) #NEWLINE# stock_state = overstocked_products ( self . facility . sql_location ) #NEWLINE# self . assertListEqual ( [ ( 'dp' , 900 , 600 ) , ( 'ip' , 678 , 600 ) ] , stock_state ) #NEWLINE# script = ( '\n            5551234 > Hmk Id 400 Dp 900 Ip 678\n            5551234 < %(reminder_trans)s\n            5551234 < %(soh_overstocked)s\n        ' % { #NEWLINE# #INDENT# 'reminder_trans' : reminder_trans , #NEWLINE# 'soh_overstocked' : ( soh_overstocked % { #NEWLINE# #INDENT# 'overstocked_list' : 'dp: 900 ip: 678' , #NEWLINE# 'products_list' : 'dp: 600 ip: 600' , #NEWLINE# #UNINDENT# } ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . run_script ( script )