def test_create_mismatched_product(self):

        mozlogger.info("test_create_mismatched_product")

        # fixtures
        pv = self.F.ProductVersionFactory()
        fields = self.new_object_data
        fields['productversion'] = unicode(
            self.get_detail_url("productversion", pv.id))

        # do put
        res = self.post(
            self.get_list_url(self.resource_name),
            params=self.credentials,
            payload=fields,
            status=400,
        )

        self.assertEqual(res.text, self._product_mismatch_message)
productversion.product must match case.product
dataset/ETHPy150Open mozilla/moztrap/tests/model/library/api/test_caseversion_resource.py/CaseVersionResourceTest.test_create_mismatched_product