def test_product_type_filter(self):

        self.user.get_domain_membership(self.TEST_DOMAIN).program_id = self.program.get_id
        self.user.save()

        program = Program(domain=self.TEST_DOMAIN, name='Test Program 2')
        program.save()

        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={}
        )

        assign_products_to_location(self.facility, [self.product])
        assign_products_to_location(self.other_facility, [self.product])
        assign_products_to_location(self.last_facility, [self.product])

        generated = list(UrgentNonReporting(self.TEST_DOMAIN).get_notifications())
        self.assertEqual(len(generated), 2)
        self.assertEqual({generated[0].user.get_id, generated[1].user.get_id},
                         {self.user.get_id, other_user.get_id})
Notifications will not be sent if the stockout is a product type does
dataset/ETHPy150Open dimagi/commcare-hq/custom/ewsghana/tests/test_notifications.py/UrgentNonReportingNotificationTestCase.test_product_type_filter