Skip to content

Failed

OmeroWeb.test.integration.test_table.TestOmeroTables.test_table_perform_slice_errors[query_validity5] (from pytest)

Failing for the past 1 build (Since #123 )
Took 3.6 sec.

Error Message

AttributeError: 'dict' object has no attribute 'has_key'

Stacktrace

self = <test_table.TestOmeroTables object at 0x7fd0d47bb670>
omero_table_file = 5964
django_client = <django.test.client.Client object at 0x7fd0d486dd00>
table_data = ([<class 'omero.grid.WellColumn'>, <class 'omero.grid.StringColumn'>, <class 'omero.grid.DoubleColumn'>, <class 'omero...45.121, 4], [3, 'column', 0.75, 356575.012, 6], [4, 'data,comma', 0.12345, 13579.0, 8], [5, 'five', 0.01, 500.05, 10]])
query_validity = ['rows=0-100&columns=0-4', True]

    @pytest.mark.parametrize("query_validity", [
        ['', False],  # missing rows and columns
        ['rows=0-4', False],  # missing columns
        ['columns=0-2', False],  # missing rows
        ['rows=0-4&columns=0-100', False],  # columns out of range
        ['rows=0-1000000&columns=0-4', False],  # too many cells
        ['rows=0-100&columns=0-4', True],  # all good
    ])
    def test_table_perform_slice_errors(
            self, omero_table_file, django_client, table_data,
            query_validity):
        """
        Test invalid slice calls
        """
        query, valid = query_validity
        request_url = reverse("webgateway_perform_slice",
                              args=[omero_table_file])
        response = get_json(django_client, '%s?%s' % (request_url, query))
>       assert response.has_key('error') != valid
E       AttributeError: 'dict' object has no attribute 'has_key'

test/integration/test_table.py:306: AttributeError