Skip to content

Regression

OmeroWeb.test.integration.test_scripts.TestScripts.test_script_inputs_outputs[inputs0] (from pytest)

Failing for the past 1 build (Since #92 )
Took 27 sec.

Error Message

KeyError: 'jobId'

Stacktrace

self = <test_scripts.TestScripts object at 0x7fd9bcf0d370>, inputs = {}

    @pytest.mark.parametrize("inputs", [{},
                                        {'Greeting': 'Hello World',
                                         'Do_Work': True,
                                         'Row_Count': 6,
                                         'Names': ['One', 'Two', 'Three'],
                                         'Channels': [1, 2]},
                                        {'Names': ['Single'],
                                         'Channels': ['not_a_number']}])
    def test_script_inputs_outputs(self, inputs):
        """Test that inputs and outputs are passed to and from script."""
        script_id = self.upload_script()
        script_run_url = reverse('script_run', kwargs={'scriptId': script_id})
    
        data = inputs.copy()
        # script basically passes inputs/defaults to outputs
        results = self.default_param_values.copy()
    
        # Create Image and add IDs to inputs
        image = self.make_image("test_script_inputs_outputs")
        data["IDs"] = str(image.id.val)
        # We expect to get Image returned (and IDs are passed through too)
        results['IDs'] = [image.id.val]
        results['Image'] = {
            'id': image.id.val,
            'type': 'Image',
            'browse_url': "/webclient/userdata/?show=image-%s" % image.id.val,
            'name': "test_script_inputs_outputs"
        }
    
        # Lists are submitted as comma-delimited strings
        if data.get('Names'):
            data['Names'] = ','.join(data['Names'])
            data['Channels'] = ','.join([str(c) for c in data['Channels']])
        rsp = post(self.django_client, script_run_url, data)
        rsp = json.loads(rsp.content)
>       job_id = rsp['jobId']
E       KeyError: 'jobId'

test/integration/test_scripts.py:136: KeyError