'Get from the url w/ a filter option and ensure items honor that filter'

def assert_correct_filter_response(self, url, filter_type, filter_value):

    requested_file_types = settings.FILES_AND_UPLOAD_TYPE_FILTERS.get(filter_value, None)
    resp = self.client.get(((((url + '?') + filter_type) + '=') + filter_value), HTTP_ACCEPT='application/json')
    json_response = json.loads(resp.content)
    assets_response = json_response['assets']
    if (filter_value is not ''):
        content_types = [asset['content_type'].lower() for asset in assets_response]
        if (filter_value is 'OTHER'):
            all_file_type_extensions = []
            for file_type in settings.FILES_AND_UPLOAD_TYPE_FILTERS:
                all_file_type_extensions.extend(file_type)
            for content_type in content_types:
                self.assertNotIn(content_type, all_file_type_extensions)
        else:
            for content_type in content_types:
                self.assertIn(content_type, requested_file_types)
