def test_productversion_list_for_create_must_not_be_empty(self):

        # get data for creation
        fields = self.new_object_data

        # mangle the data
        fields["productversions"] = []

        # do the create
        res = self.post(
            self.get_list_url(self.resource_name),
            params=self.credentials,
            payload=fields,
            status=400,
            )
        assert res.text == self._pv_required_msg
If the productversions list does not contain an item, there will be a 500 error.
dataset/ETHPy150Open mozilla/moztrap/tests/model/core/api/test_product_resource.py/ProductResourceTest.test_productversion_list_for_create_must_not_be_empty