#NEWLINE# def test_product_type_filter( self ) : #NEWLINE# #INDENT# '\n        Notifications will not be sent if the stockout is a product type does\n        not interest the user.\n        ' #NEWLINE# self . user . get_domain_membership ( self . TEST_DOMAIN ) . program_id = self . program . get_id #NEWLINE# self . user . save ( ) #NEWLINE# program = Program ( domain = self . TEST_DOMAIN , name = 'Test Program 2' ) #NEWLINE# program . save ( ) #NEWLINE# other_user = bootstrap_web_user ( username = 'test2' , domain = self . TEST_DOMAIN , phone_number = '+44445' , location = self . region , password = 'dummy' , email = 'test@example.com' , user_data = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# assign_products_to_location ( self . facility , [ self . product ] ) #NEWLINE# assign_products_to_location ( self . other_facility , [ other_user . product ] ) #NEWLINE# assign_products_to_location ( self . last_facility , [ self . product ] ) #NEWLINE# generated = list ( UrgentNonReporting ( self . TEST_DOMAIN ) . get_notifications ( ) ) #NEWLINE# self . assertEqual ( len ( generated ) , 2 ) #NEWLINE# self . assertEqual ( { generated [ 0 ] . user . get_id , generated [ 1 ] . user . get_id } , { self . user . get_id , other_user . get_id } )