Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

django: triage expressions_case test failures #353

Closed
timgraham opened this issue Mar 18, 2020 · 4 comments
Closed

django: triage expressions_case test failures #353

timgraham opened this issue Mar 18, 2020 · 4 comments
Assignees
Labels
django-test-suite 🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@timgraham
Copy link
Contributor

Investigate and and ticket out these issues as needed:

Using existing test database for alias 'default'...
.FE..F...FF.FFFFFF.FFFFFFF.FFFFFFFF.FFFF.FF..FF....FFEFEEFFFFFFFFFFFFFFF.FFFFFF..F...
======================================================================
ERROR: test_filter_example (expressions_case.tests.CaseDocumentationExamples)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 79, in next
    return six.next(self._wrapped)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/grpc/_channel.py", line 392, in __next__
    return self._next()
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/grpc/_channel.py", line 561, in _next
    raise self
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
	status = StatusCode.INVALID_ARGUMENT
	details = "No matching signature for operator <= for argument types: DATE, INT64. Supported signature: ANY <= ANY [at 1:177]\n...account_type FROM expressions_case_client WHERE expressions_case_client.re...\n                                                   ^"
	debug_error_string = "{"created":"@1577631809.151432362","description":"Error received from peer ipv4:172.217.10.234:443","file":"src/core/lib/surface/call.cc","file_line":1055,"grpc_message":"No matching signature for operator <= for argument types: DATE, INT64. Supported signature: ANY <= ANY [at 1:177]\n...account_type FROM expressions_case_client WHERE expressions_case_client.re...\n                                                   ^","grpc_status":3}"
>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 91, in execute
    self.__handle_DQL(sql, args or None)
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 183, in __handle_DQL
    self.__itr = PeekIterator(self.__res)
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 322, in __init__
    head = next(itr_src)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/cloud/spanner_v1/streamed.py", line 143, in __iter__
    self._consume_next()
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/cloud/spanner_v1/streamed.py", line 116, in _consume_next
    response = six.next(self._response_iterator)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/cloud/spanner_v1/snapshot.py", line 45, in _restart_on_unavailable
    for item in iterator:
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 81, in next
    six.raise_from(exceptions.from_grpc_error(exc), exc)
  File "<string>", line 3, in raise_from
google.api_core.exceptions.InvalidArgument: 400 No matching signature for operator <= for argument types: DATE, INT64. Supported signature: ANY <= ANY [at 1:177]\n...account_type FROM expressions_case_client WHERE expressions_case_client.re...\n                                                   ^

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/tim/code/django/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 99, in execute
    raise ProgrammingError(e.details if hasattr(e, 'details') else e)
spanner.dbapi.exceptions.ProgrammingError: 400 No matching signature for operator <= for argument types: DATE, INT64. Supported signature: ANY <= ANY [at 1:177]\n...account_type FROM expressions_case_client WHERE expressions_case_client.re...\n                                                   ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 1301, in test_filter_example
    transform=attrgetter('name', 'account_type')
  File "/home/tim/code/django/django/test/testcases.py", line 1047, in assertQuerysetEqual
    items = map(transform, qs)
  File "/home/tim/code/django/django/db/models/query.py", line 274, in __iter__
    self._fetch_all()
  File "/home/tim/code/django/django/db/models/query.py", line 1242, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/home/tim/code/django/django/db/models/query.py", line 55, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
  File "/home/tim/code/django/django/db/models/sql/compiler.py", line 1133, in execute_sql
    cursor.execute(sql, params)
  File "/home/tim/code/django/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/home/tim/code/django/django/db/backends/utils.py", line 76, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/home/tim/code/django/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/home/tim/code/django/django/db/utils.py", line 89, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/home/tim/code/django/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 99, in execute
    raise ProgrammingError(e.details if hasattr(e, 'details') else e)
django.db.utils.ProgrammingError: 400 No matching signature for operator <= for argument types: DATE, INT64. Supported signature: ANY <= ANY [at 1:177]\n...account_type FROM expressions_case_client WHERE expressions_case_client.re...\n                                                   ^

======================================================================
ERROR: test_update_binary (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 57, in error_remapped_callable
    return callable_(*args, **kwargs)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/grpc/_channel.py", line 690, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/grpc/_channel.py", line 592, in _end_unary_response_blocking
    raise _Rendezvous(state, None, None, deadline)
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
	status = StatusCode.INVALID_ARGUMENT
	details = "Value of type INT64 cannot be assigned to binary, which has type BYTES [at 1:52]\nUPDATE expressions_case_casetestmodel SET binary = CASE WHEN (expressions_cas...\n                                                   ^"
	debug_error_string = "{"created":"@1577632634.714942491","description":"Error received from peer ipv4:172.217.6.202:443","file":"src/core/lib/surface/call.cc","file_line":1055,"grpc_message":"Value of type INT64 cannot be assigned to binary, which has type BYTES [at 1:52]\nUPDATE expressions_case_casetestmodel SET binary = CASE WHEN (expressions_cas...\n                                                   ^","grpc_status":3}"
>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 95, in execute
    self.__handle_update(sql, args or None)
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 107, in __handle_update
    sql, params,
  File "/home/tim/code/spanner-orm/spanner/dbapi/connection.py", line 91, in in_transaction
    return self.__dbhandle.run_in_transaction(fn, *args, **kwargs)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/cloud/spanner_v1/database.py", line 443, in run_in_transaction
    return session.run_in_transaction(func, *args, **kw)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/cloud/spanner_v1/session.py", line 299, in run_in_transaction
    return_value = func(txn, *args, **kw)
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 114, in __do_execute_update
    res = transaction.execute_update(sql, params=params, param_types=get_param_types(params))
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/cloud/spanner_v1/transaction.py", line 202, in execute_update
    metadata=metadata,
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/cloud/spanner_v1/gapic/spanner_client.py", line 812, in execute_sql
    request, retry=retry, timeout=timeout, metadata=metadata
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/gapic_v1/method.py", line 143, in __call__
    return wrapped_func(*args, **kwargs)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/retry.py", line 277, in retry_wrapped_func
    on_error=on_error,
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/retry.py", line 182, in retry_target
    return target()
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/timeout.py", line 214, in func_with_timeout
    return func(*args, **kwargs)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 59, in error_remapped_callable
    six.raise_from(exceptions.from_grpc_error(exc), exc)
  File "<string>", line 3, in raise_from
google.api_core.exceptions.InvalidArgument: 400 Value of type INT64 cannot be assigned to binary, which has type BYTES [at 1:52]\nUPDATE expressions_case_casetestmodel SET binary = CASE WHEN (expressions_cas...\n                                                   ^

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/tim/code/django/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 99, in execute
    raise ProgrammingError(e.details if hasattr(e, 'details') else e)
spanner.dbapi.exceptions.ProgrammingError: 400 Value of type INT64 cannot be assigned to binary, which has type BYTES [at 1:52]\nUPDATE expressions_case_casetestmodel SET binary = CASE WHEN (expressions_cas...\n                                                   ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 636, in test_update_binary
    default=Value(b'', output_field=models.BinaryField()),
  File "/home/tim/code/django/django/db/models/manager.py", line 82, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/tim/code/django/django/db/models/query.py", line 741, in update
    rows = query.get_compiler(self.db).execute_sql(CURSOR)
  File "/home/tim/code/django/django/db/models/sql/compiler.py", line 1462, in execute_sql
    cursor = super().execute_sql(result_type)
  File "/home/tim/code/django/django/db/models/sql/compiler.py", line 1133, in execute_sql
    cursor.execute(sql, params)
  File "/home/tim/code/django/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/home/tim/code/django/django/db/backends/utils.py", line 76, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/home/tim/code/django/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/home/tim/code/django/django/db/utils.py", line 89, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/home/tim/code/django/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 99, in execute
    raise ProgrammingError(e.details if hasattr(e, 'details') else e)
django.db.utils.ProgrammingError: 400 Value of type INT64 cannot be assigned to binary, which has type BYTES [at 1:52]\nUPDATE expressions_case_casetestmodel SET binary = CASE WHEN (expressions_cas...\n                                                   ^

======================================================================
ERROR: test_update_date (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 57, in error_remapped_callable
    return callable_(*args, **kwargs)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/grpc/_channel.py", line 690, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/grpc/_channel.py", line 592, in _end_unary_response_blocking
    raise _Rendezvous(state, None, None, deadline)
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
	status = StatusCode.INVALID_ARGUMENT
	details = "Value of type INT64 cannot be assigned to date_field, which has type DATE [at 1:56]\n...expressions_case_casetestmodel SET date_field = CASE WHEN (expressions_cas...\n                                                   ^"
	debug_error_string = "{"created":"@1577632666.217471158","description":"Error received from peer ipv4:172.217.7.10:443","file":"src/core/lib/surface/call.cc","file_line":1055,"grpc_message":"Value of type INT64 cannot be assigned to date_field, which has type DATE [at 1:56]\n...expressions_case_casetestmodel SET date_field = CASE WHEN (expressions_cas...\n                                                   ^","grpc_status":3}"
>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 95, in execute
    self.__handle_update(sql, args or None)
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 107, in __handle_update
    sql, params,
  File "/home/tim/code/spanner-orm/spanner/dbapi/connection.py", line 91, in in_transaction
    return self.__dbhandle.run_in_transaction(fn, *args, **kwargs)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/cloud/spanner_v1/database.py", line 443, in run_in_transaction
    return session.run_in_transaction(func, *args, **kw)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/cloud/spanner_v1/session.py", line 299, in run_in_transaction
    return_value = func(txn, *args, **kw)
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 114, in __do_execute_update
    res = transaction.execute_update(sql, params=params, param_types=get_param_types(params))
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/cloud/spanner_v1/transaction.py", line 202, in execute_update
    metadata=metadata,
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/cloud/spanner_v1/gapic/spanner_client.py", line 812, in execute_sql
    request, retry=retry, timeout=timeout, metadata=metadata
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/gapic_v1/method.py", line 143, in __call__
    return wrapped_func(*args, **kwargs)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/retry.py", line 277, in retry_wrapped_func
    on_error=on_error,
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/retry.py", line 182, in retry_target
    return target()
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/timeout.py", line 214, in func_with_timeout
    return func(*args, **kwargs)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 59, in error_remapped_callable
    six.raise_from(exceptions.from_grpc_error(exc), exc)
  File "<string>", line 3, in raise_from
google.api_core.exceptions.InvalidArgument: 400 Value of type INT64 cannot be assigned to date_field, which has type DATE [at 1:56]\n...expressions_case_casetestmodel SET date_field = CASE WHEN (expressions_cas...\n                                                   ^

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/tim/code/django/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 99, in execute
    raise ProgrammingError(e.details if hasattr(e, 'details') else e)
spanner.dbapi.exceptions.ProgrammingError: 400 Value of type INT64 cannot be assigned to date_field, which has type DATE [at 1:56]\n...expressions_case_casetestmodel SET date_field = CASE WHEN (expressions_cas...\n                                                   ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 663, in test_update_date
    When(integer=2, then=date(2015, 1, 2)),
  File "/home/tim/code/django/django/db/models/manager.py", line 82, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/tim/code/django/django/db/models/query.py", line 741, in update
    rows = query.get_compiler(self.db).execute_sql(CURSOR)
  File "/home/tim/code/django/django/db/models/sql/compiler.py", line 1462, in execute_sql
    cursor = super().execute_sql(result_type)
  File "/home/tim/code/django/django/db/models/sql/compiler.py", line 1133, in execute_sql
    cursor.execute(sql, params)
  File "/home/tim/code/django/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/home/tim/code/django/django/db/backends/utils.py", line 76, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/home/tim/code/django/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/home/tim/code/django/django/db/utils.py", line 89, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/home/tim/code/django/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 99, in execute
    raise ProgrammingError(e.details if hasattr(e, 'details') else e)
django.db.utils.ProgrammingError: 400 Value of type INT64 cannot be assigned to date_field, which has type DATE [at 1:56]\n...expressions_case_casetestmodel SET date_field = CASE WHEN (expressions_cas...\n                                                   ^

======================================================================
ERROR: test_update_date_time (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 57, in error_remapped_callable
    return callable_(*args, **kwargs)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/grpc/_channel.py", line 690, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/grpc/_channel.py", line 592, in _end_unary_response_blocking
    raise _Rendezvous(state, None, None, deadline)
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
	status = StatusCode.INVALID_ARGUMENT
	details = "Value of type INT64 cannot be assigned to date_time, which has type TIMESTAMP [at 1:55]\nUPDATE expressions_case_casetestmodel SET date_time = CASE WHEN (expressions_...\n                                                      ^"
	debug_error_string = "{"created":"@1577632682.272844201","description":"Error received from peer ipv4:172.217.6.202:443","file":"src/core/lib/surface/call.cc","file_line":1055,"grpc_message":"Value of type INT64 cannot be assigned to date_time, which has type TIMESTAMP [at 1:55]\nUPDATE expressions_case_casetestmodel SET date_time = CASE WHEN (expressions_...\n                                                      ^","grpc_status":3}"
>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 95, in execute
    self.__handle_update(sql, args or None)
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 107, in __handle_update
    sql, params,
  File "/home/tim/code/spanner-orm/spanner/dbapi/connection.py", line 91, in in_transaction
    return self.__dbhandle.run_in_transaction(fn, *args, **kwargs)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/cloud/spanner_v1/database.py", line 443, in run_in_transaction
    return session.run_in_transaction(func, *args, **kw)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/cloud/spanner_v1/session.py", line 299, in run_in_transaction
    return_value = func(txn, *args, **kw)
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 114, in __do_execute_update
    res = transaction.execute_update(sql, params=params, param_types=get_param_types(params))
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/cloud/spanner_v1/transaction.py", line 202, in execute_update
    metadata=metadata,
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/cloud/spanner_v1/gapic/spanner_client.py", line 812, in execute_sql
    request, retry=retry, timeout=timeout, metadata=metadata
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/gapic_v1/method.py", line 143, in __call__
    return wrapped_func(*args, **kwargs)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/retry.py", line 277, in retry_wrapped_func
    on_error=on_error,
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/retry.py", line 182, in retry_target
    return target()
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/timeout.py", line 214, in func_with_timeout
    return func(*args, **kwargs)
  File "/home/tim/.virtualenvs/django37/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 59, in error_remapped_callable
    six.raise_from(exceptions.from_grpc_error(exc), exc)
  File "<string>", line 3, in raise_from
google.api_core.exceptions.InvalidArgument: 400 Value of type INT64 cannot be assigned to date_time, which has type TIMESTAMP [at 1:55]\nUPDATE expressions_case_casetestmodel SET date_time = CASE WHEN (expressions_...\n                                                      ^

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/tim/code/django/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 99, in execute
    raise ProgrammingError(e.details if hasattr(e, 'details') else e)
spanner.dbapi.exceptions.ProgrammingError: 400 Value of type INT64 cannot be assigned to date_time, which has type TIMESTAMP [at 1:55]\nUPDATE expressions_case_casetestmodel SET date_time = CASE WHEN (expressions_...\n                                                      ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 679, in test_update_date_time
    When(integer=2, then=datetime(2015, 1, 2)),
  File "/home/tim/code/django/django/db/models/manager.py", line 82, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/tim/code/django/django/db/models/query.py", line 741, in update
    rows = query.get_compiler(self.db).execute_sql(CURSOR)
  File "/home/tim/code/django/django/db/models/sql/compiler.py", line 1462, in execute_sql
    cursor = super().execute_sql(result_type)
  File "/home/tim/code/django/django/db/models/sql/compiler.py", line 1133, in execute_sql
    cursor.execute(sql, params)
  File "/home/tim/code/django/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/home/tim/code/django/django/db/backends/utils.py", line 76, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/home/tim/code/django/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/home/tim/code/django/django/db/utils.py", line 89, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/home/tim/code/django/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/home/tim/code/spanner-orm/spanner/dbapi/cursor.py", line 99, in execute
    raise ProgrammingError(e.details if hasattr(e, 'details') else e)
django.db.utils.ProgrammingError: 400 Value of type INT64 cannot be assigned to date_time, which has type TIMESTAMP [at 1:55]\nUPDATE expressions_case_casetestmodel SET date_time = CASE WHEN (expressions_...\n                                                      ^

======================================================================
FAIL: test_conditional_update_example (expressions_case.tests.CaseDocumentationExamples)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 1244, in test_conditional_update_example
    transform=attrgetter('name', 'account_type')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [('James Smith', 'R'), ('Jane Doe', 'G'), ('Jack Black', 'P')] != [('Jane Doe', 'G'), ('James Smith', 'R'), ('Jack Black', 'P')]

First differing element 0:
('James Smith', 'R')
('Jane Doe', 'G')

- [('James Smith', 'R'), ('Jane Doe', 'G'), ('Jack Black', 'P')]
+ [('Jane Doe', 'G'), ('James Smith', 'R'), ('Jack Black', 'P')]

======================================================================
FAIL: test_simple_example (expressions_case.tests.CaseDocumentationExamples)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 1212, in test_simple_example
    transform=attrgetter('name', 'discount')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [('Jane Doe', '0%'), ('Jack Black', '10%'), ('James Smith', '5%')] != [('Jane Doe', '0%'), ('James Smith', '5%'), ('Jack Black', '10%')]

First differing element 1:
('Jack Black', '10%')
('James Smith', '5%')

- [('Jane Doe', '0%'), ('Jack Black', '10%'), ('James Smith', '5%')]
+ [('Jane Doe', '0%'), ('James Smith', '5%'), ('Jack Black', '10%')]

======================================================================
FAIL: test_annotate (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 72, in test_annotate
    transform=attrgetter('integer', 'test')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(2, 'two'), (2, 'two'), (3, 'other'), (4, [44 chars]er')] != [(1, 'one'), (2, 'two'), (3, 'other'), (2, [44 chars]er')]

First differing element 0:
(2, 'two')
(1, 'one')

- [(2, 'two'),
?   ^   --

+ [(1, 'one'),
?   ^    ++

   (2, 'two'),
   (3, 'other'),
-  (4, 'other'),
+  (2, 'two'),
   (3, 'other'),
-  (1, 'one'),
-  (3, 'other')]
?              ^

+  (3, 'other'),
?              ^

+  (4, 'other')]

======================================================================
FAIL: test_annotate_exclude (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 260, in test_annotate_exclude
    transform=attrgetter('integer', 'test')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(2, 'two'), (1, 'one'), (2, 'two')] != [(1, 'one'), (2, 'two'), (2, 'two')]

First differing element 0:
(2, 'two')
(1, 'one')

- [(2, 'two'), (1, 'one'), (2, 'two')]
+ [(1, 'one'), (2, 'two'), (2, 'two')]

======================================================================
FAIL: test_annotate_with_aggregation_in_condition (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 231, in test_annotate_with_aggregation_in_condition
    transform=itemgetter('integer', 'integer2', 'test')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, 3, 'min'), (2, 3, 'max'), (2, 2, 'min'[57 chars]in')] != [(1, 1, 'min'), (2, 3, 'max'), (3, 4, 'max'[57 chars]in')]

First differing element 0:
(3, 3, 'min')
(1, 1, 'min')

- [(3, 3, 'min'),
?   ^  ^

+ [(1, 1, 'min'),
?   ^  ^

   (2, 3, 'max'),
+  (3, 4, 'max'),
   (2, 2, 'min'),
   (3, 4, 'max'),
-  (3, 4, 'max'),
?      ^    ^^

+  (3, 3, 'min'),
?      ^    ^^

-  (4, 5, 'min'),
?               ^

+  (4, 5, 'min')]
?               ^

-  (1, 1, 'min')]

======================================================================
FAIL: test_annotate_with_aggregation_in_predicate (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 248, in test_annotate_with_aggregation_in_predicate
    transform=itemgetter('integer', 'max', 'test')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(1, 1, ''), (4, 5, ''), (2, 3, 'max = 3'), (3, 4, 'max[59 chars] 3')] != [(1, 1, ''), (2, 3, 'max = 3'), (3, 4, 'max = 4'), (2, [59 chars] '')]

First differing element 1:
(4, 5, '')
(2, 3, 'max = 3')

  [(1, 1, ''),
-  (4, 5, ''),
+  (2, 3, 'max = 3'),
+  (3, 4, 'max = 4'),
   (2, 3, 'max = 3'),
   (3, 4, 'max = 4'),
   (3, 4, 'max = 4'),
+  (4, 5, '')]
-  (3, 4, 'max = 4'),
-  (2, 3, 'max = 3')]

======================================================================
FAIL: test_annotate_with_aggregation_in_value (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 215, in test_annotate_with_aggregation_in_value
    transform=itemgetter('integer', 'test', 'min', 'max')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, 4, 3, 4), (4, None, 5, 5), (2, 2, 2, 3[56 chars], 3)] != [(1, None, 1, 1), (2, 2, 2, 3), (3, 4, 3, 4[56 chars], 5)]

First differing element 0:
(3, 4, 3, 4)
(1, None, 1, 1)

- [(3, 4, 3, 4),
-  (4, None, 5, 5),
? ^ ^        ^  ^

+ [(1, None, 1, 1),
? ^ ^        ^  ^

   (2, 2, 2, 3),
-  (1, None, 1, 1),
+  (3, 4, 3, 4),
+  (2, 2, 2, 3),
   (3, 4, 3, 4),
   (3, 4, 3, 4),
-  (2, 2, 2, 3)]
+  (4, None, 5, 5)]

======================================================================
FAIL: test_annotate_with_annotation_in_condition (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 183, in test_annotate_with_annotation_in_condition
    transform=attrgetter('integer', 'f_test')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(2, 'equal'), (3, '+1'), (3, 'equal'), (2,[38 chars]+1')] != [(1, 'equal'), (2, '+1'), (3, '+1'), (2, 'e[38 chars]+1')]

First differing element 0:
(2, 'equal')
(1, 'equal')

- [(2, 'equal'),
?   ^

+ [(1, 'equal'),
?   ^

+  (2, '+1'),
+  (3, '+1'),
+  (2, 'equal'),
   (3, '+1'),
   (3, 'equal'),
-  (2, '+1'),
-  (3, '+1'),
-  (1, 'equal'),
   (4, '+1')]

======================================================================
FAIL: test_annotate_with_annotation_in_predicate (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 200, in test_annotate_with_annotation_in_predicate
    transform=attrgetter('integer', 'test')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, 'one'), (2, 'zero'), (3, 'one'), (1, '[49 chars]ne')] != [(1, 'negative one'), (2, 'zero'), (3, 'one[49 chars]er')]

First differing element 0:
(3, 'one')
(1, 'negative one')

- [(3, 'one'),
+ [(1, 'negative one'),
   (2, 'zero'),
   (3, 'one'),
-  (1, 'negative one'),
-  (4, 'other'),
   (2, 'zero'),
-  (3, 'one')]
?            ^

+  (3, 'one'),
?            ^

+  (3, 'one'),
+  (4, 'other')]

======================================================================
FAIL: test_annotate_with_annotation_in_value (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 168, in test_annotate_with_annotation_in_value
    transform=attrgetter('integer', 'f_test')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(1, 2), (3, 3), (4, 4), (3, 3), (3, 3), (2, 5), (2, 5)] != [(1, 2), (2, 5), (3, 3), (2, 5), (3, 3), (3, 3), (4, 4)]

First differing element 1:
(3, 3)
(2, 5)

- [(1, 2), (3, 3), (4, 4), (3, 3), (3, 3), (2, 5), (2, 5)]
+ [(1, 2), (2, 5), (3, 3), (2, 5), (3, 3), (3, 3), (4, 4)]

======================================================================
FAIL: test_annotate_with_expression_as_condition (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 105, in test_annotate_with_expression_as_condition
    transform=attrgetter('integer', 'f_test')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(2, '+1'), (2, 'equal'), (3, '+1'), (4, '+[38 chars]al')] != [(1, 'equal'), (2, '+1'), (3, '+1'), (2, 'e[38 chars]+1')]

First differing element 0:
(2, '+1')
(1, 'equal')

+ [(1, 'equal'),
- [(2, '+1'),
? ^

+  (2, '+1'),
? ^

+  (3, '+1'),
   (2, 'equal'),
   (3, '+1'),
-  (4, '+1'),
-  (3, '+1'),
-  (1, 'equal'),
?   ^

+  (3, 'equal'),
?   ^

-  (3, 'equal')]
+  (4, '+1')]

======================================================================
FAIL: test_annotate_with_expression_as_value (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 94, in test_annotate_with_expression_as_value
    transform=attrgetter('integer', 'f_test')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, 3), (1, 2), (3, 3), (2, 5), (2, 5), (4, 4), (3, 3)] != [(1, 2), (2, 5), (3, 3), (2, 5), (3, 3), (3, 3), (4, 4)]

First differing element 0:
(3, 3)
(1, 2)

- [(3, 3), (1, 2), (3, 3), (2, 5), (2, 5), (4, 4), (3, 3)]
+ [(1, 2), (2, 5), (3, 3), (2, 5), (3, 3), (3, 3), (4, 4)]

======================================================================
FAIL: test_annotate_with_in_clause (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 127, in test_annotate_with_in_clause
    transform=attrgetter('integer', 'in_test')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, 0), (4, 5), (2, 0), (3, 0), (3, 0), (2, 0), (1, 0)] != [(1, 0), (2, 0), (3, 0), (2, 0), (3, 0), (3, 0), (4, 5)]

First differing element 0:
(3, 0)
(1, 0)

- [(3, 0), (4, 5), (2, 0), (3, 0), (3, 0), (2, 0), (1, 0)]
+ [(1, 0), (2, 0), (3, 0), (2, 0), (3, 0), (3, 0), (4, 5)]

======================================================================
FAIL: test_annotate_with_join_in_condition (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 139, in test_annotate_with_join_in_condition
    transform=attrgetter('integer', 'join_test')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, 'equal'), (2, '+1'), (2, 'equal'), (3,[41 chars]al')] != [(1, 'equal'), (2, '+1'), (3, '+1'), (2, 'e[41 chars]er')]

First differing element 0:
(3, 'equal')
(1, 'equal')

- [(3, 'equal'),
?   ^

+ [(1, 'equal'),
?   ^

   (2, '+1'),
+  (3, '+1'),
   (2, 'equal'),
   (3, '+1'),
-  (3, '+1'),
+  (3, 'equal'),
-  (4, 'other'),
?              ^

+  (4, 'other')]
?              ^

-  (1, 'equal')]

======================================================================
FAIL: test_annotate_with_join_in_predicate (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 152, in test_annotate_with_join_in_predicate
    transform=attrgetter('integer', 'join_test')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(2, 'two'), (1, 'one'), (2, 'two'), (3, 't[42 chars]ee')] != [(1, 'one'), (2, 'two'), (3, 'three'), (2, [42 chars]ne')]

First differing element 0:
(2, 'two')
(1, 'one')

- [(2, 'two'),
-  (1, 'one'),
? ^

+ [(1, 'one'),
? ^

+  (2, 'two'),
+  (3, 'three'),
   (2, 'two'),
   (3, 'three'),
   (3, 'three'),
-  (4, 'one'),
?            ^

+  (4, 'one')]
?            ^

-  (3, 'three')]

======================================================================
FAIL: test_annotate_with_join_in_value (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 116, in test_annotate_with_join_in_value
    transform=attrgetter('integer', 'join_test')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(4, 1), (1, 2), (2, 5), (3, 3), (3, 3), (2, 5), (3, 3)] != [(1, 2), (2, 5), (3, 3), (2, 5), (3, 3), (3, 3), (4, 1)]

First differing element 0:
(4, 1)
(1, 2)

- [(4, 1), (1, 2), (2, 5), (3, 3), (3, 3), (2, 5), (3, 3)]
+ [(1, 2), (2, 5), (3, 3), (2, 5), (3, 3), (3, 3), (4, 1)]

======================================================================
FAIL: test_annotate_without_default (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 83, in test_annotate_without_default
    transform=attrgetter('integer', 'test')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, None), (2, 2), (2, 2), (3, None), (4, None), (3, None), (1, 1)] != [(1, 1), (2, 2), (3, None), (2, 2), (3, None), (3, None), (4, None)]

First differing element 0:
(3, None)
(1, 1)

- [(3, None), (2, 2), (2, 2), (3, None), (4, None), (3, None), (1, 1)]
+ [(1, 1), (2, 2), (3, None), (2, 2), (3, None), (3, None), (4, None)]

======================================================================
FAIL: test_combined_expression (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 296, in test_combined_expression
    transform=attrgetter('integer', 'test')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(2, 2), (3, 4), (1, 3), (3, 4), (4, 4), (3, 4), (2, 2)] != [(1, 3), (2, 2), (3, 4), (2, 2), (3, 4), (3, 4), (4, 4)]

First differing element 0:
(2, 2)
(1, 3)

- [(2, 2), (3, 4), (1, 3), (3, 4), (4, 4), (3, 4), (2, 2)]
+ [(1, 3), (2, 2), (3, 4), (2, 2), (3, 4), (3, 4), (4, 4)]

======================================================================
FAIL: test_combined_q_object (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 1038, in test_combined_q_object
    transform=attrgetter('integer', 'integer2', 'test')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(4, 5, 'default'), (2, 2, 'when'), (3, 4, [76 chars]en')] != [(1, 1, 'default'), (2, 3, 'when'), (3, 4, [76 chars]lt')]

First differing element 0:
(4, 5, 'default')
(1, 1, 'default')

- [(4, 5, 'default'),
?   ^  ^

+ [(1, 1, 'default'),
?   ^  ^

+  (2, 3, 'when'),
+  (3, 4, 'default'),
   (2, 2, 'when'),
   (3, 4, 'default'),
-  (1, 1, 'default'),
   (3, 3, 'when'),
-  (3, 4, 'default'),
?   ---             ^

+  (4, 5, 'default')]
?     +++           ^

-  (2, 3, 'when')]

======================================================================
FAIL: test_filter (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 382, in test_filter
    transform=attrgetter('integer', 'integer2')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(1, 1), (3, 4), (3, 4), (2, 3)] != [(1, 1), (2, 3), (3, 4), (3, 4)]

First differing element 1:
(3, 4)
(2, 3)

- [(1, 1), (3, 4), (3, 4), (2, 3)]
?                        --------

+ [(1, 1), (2, 3), (3, 4), (3, 4)]
?          ++++++++


======================================================================
FAIL: test_filter_with_aggregation_in_condition (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 525, in test_filter_with_aggregation_in_condition
    transform=itemgetter('integer', 'integer2', 'min', 'max')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, 4, 3, 4), (3, 4, 3, 4), (2, 2, 2, 3)] != [(3, 4, 3, 4), (2, 2, 2, 3), (3, 4, 3, 4)]

First differing element 1:
(3, 4, 3, 4)
(2, 2, 2, 3)

- [(3, 4, 3, 4), (3, 4, 3, 4), (2, 2, 2, 3)]
+ [(3, 4, 3, 4), (2, 2, 2, 3), (3, 4, 3, 4)]

======================================================================
FAIL: test_filter_with_aggregation_in_predicate (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 539, in test_filter_with_aggregation_in_predicate
    transform=itemgetter('integer', 'integer2', 'max')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, 4, 4), (2, 3, 3), (3, 3, 4), (2, 2, 3), (3, 4, 4)] != [(2, 3, 3), (3, 4, 4), (2, 2, 3), (3, 4, 4), (3, 3, 4)]

First differing element 0:
(3, 4, 4)
(2, 3, 3)

- [(3, 4, 4), (2, 3, 3), (3, 3, 4), (2, 2, 3), (3, 4, 4)]
+ [(2, 3, 3), (3, 4, 4), (2, 2, 3), (3, 4, 4), (3, 3, 4)]

======================================================================
FAIL: test_filter_with_aggregation_in_value (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 510, in test_filter_with_aggregation_in_value
    transform=itemgetter('integer', 'integer2', 'min', 'max')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, 4, 3, 4), (3, 4, 3, 4), (2, 2, 2, 3)] != [(3, 4, 3, 4), (2, 2, 2, 3), (3, 4, 3, 4)]

First differing element 1:
(3, 4, 3, 4)
(2, 2, 2, 3)

- [(3, 4, 3, 4), (3, 4, 3, 4), (2, 2, 2, 3)]
+ [(3, 4, 3, 4), (2, 2, 2, 3), (3, 4, 3, 4)]

======================================================================
FAIL: test_filter_with_annotation_in_condition (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 479, in test_filter_with_annotation_in_condition
    transform=attrgetter('integer', 'integer2')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(2, 2), (3, 4), (3, 4)] != [(3, 4), (2, 2), (3, 4)]

First differing element 0:
(2, 2)
(3, 4)

- [(2, 2), (3, 4), (3, 4)]
+ [(3, 4), (2, 2), (3, 4)]

======================================================================
FAIL: test_filter_with_annotation_in_predicate (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 495, in test_filter_with_annotation_in_predicate
    transform=attrgetter('integer', 'integer2')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, 4), (3, 4), (1, 1), (2, 3)] != [(1, 1), (2, 3), (3, 4), (3, 4)]

First differing element 0:
(3, 4)
(1, 1)

- [(3, 4), (3, 4), (1, 1), (2, 3)]
+ [(1, 1), (2, 3), (3, 4), (3, 4)]

======================================================================
FAIL: test_filter_with_expression_as_condition (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 415, in test_filter_with_expression_as_condition
    transform=attrgetter('integer', 'integer2', 'string')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(2, 2, '2'), (3, 4, '3'), (3, 4, '3')] != [(3, 4, '3'), (2, 2, '2'), (3, 4, '3')]

First differing element 0:
(2, 2, '2')
(3, 4, '3')

- [(2, 2, '2'), (3, 4, '3'), (3, 4, '3')]
+ [(3, 4, '3'), (2, 2, '2'), (3, 4, '3')]

======================================================================
FAIL: test_filter_with_expression_as_value (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 404, in test_filter_with_expression_as_value
    transform=attrgetter('integer', 'integer2')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(2, 3), (1, 1), (3, 3)] != [(1, 1), (2, 3), (3, 3)]

First differing element 0:
(2, 3)
(1, 1)

- [(2, 3), (1, 1), (3, 3)]
+ [(1, 1), (2, 3), (3, 3)]

======================================================================
FAIL: test_filter_with_join_in_condition (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 437, in test_filter_with_join_in_condition
    transform=attrgetter('integer', 'integer2')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, 3), (2, 3)] != [(2, 3), (3, 3)]

First differing element 0:
(3, 3)
(2, 3)

- [(3, 3), (2, 3)]
+ [(2, 3), (3, 3)]

======================================================================
FAIL: test_filter_with_join_in_predicate (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 449, in test_filter_with_join_in_predicate
    transform=attrgetter('integer', 'integer2')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, 4), (2, 3), (1, 1), (3, 4)] != [(1, 1), (2, 3), (3, 4), (3, 4)]

First differing element 0:
(3, 4)
(1, 1)

- [(3, 4), (2, 3), (1, 1), (3, 4)]
+ [(1, 1), (2, 3), (3, 4), (3, 4)]

======================================================================
FAIL: test_filter_without_default (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 393, in test_filter_without_default
    transform=attrgetter('integer', 'integer2')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, 4), (3, 4), (2, 3)] != [(2, 3), (3, 4), (3, 4)]

First differing element 0:
(3, 4)
(2, 3)

- [(3, 4), (3, 4), (2, 3)]
+ [(2, 3), (3, 4), (3, 4)]

======================================================================
FAIL: test_in_subquery (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 310, in test_in_subquery
    transform=attrgetter('integer', 'integer2')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, 3), (1, 1), (4, 5), (2, 2)] != [(1, 1), (2, 2), (3, 3), (4, 5)]

First differing element 0:
(3, 3)
(1, 1)

- [(3, 3), (1, 1), (4, 5), (2, 2)]
+ [(1, 1), (2, 2), (3, 3), (4, 5)]

======================================================================
FAIL: test_lookup_different_fields (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 1022, in test_lookup_different_fields
    transform=attrgetter('integer', 'integer2', 'test')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(4, 5, 'default'), (3, 4, 'default'), (2, [82 chars]lt')] != [(1, 1, 'default'), (2, 3, 'when'), (3, 4, [82 chars]lt')]

First differing element 0:
(4, 5, 'default')
(1, 1, 'default')

- [(4, 5, 'default'),
?   ^  ^

+ [(1, 1, 'default'),
?   ^  ^

+  (2, 3, 'when'),
   (3, 4, 'default'),
-  (2, 3, 'when'),
-  (1, 1, 'default'),
   (2, 2, 'default'),
+  (3, 4, 'default'),
   (3, 3, 'default'),
-  (3, 4, 'default')]
?   ---

+  (4, 5, 'default')]
?     +++


======================================================================
FAIL: test_lookup_in_condition (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 1006, in test_lookup_in_condition
    transform=attrgetter('integer', 'test')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, 'greater than 2'), (3, 'greater than 2[102 chars] 2')] != [(1, 'less than 2'), (2, 'equal to 2'), (3,[102 chars] 2')]

First differing element 0:
(3, 'greater than 2')
(1, 'less than 2')

- [(3, 'greater than 2'),
+ [(1, 'less than 2'),
+  (2, 'equal to 2'),
   (3, 'greater than 2'),
-  (1, 'less than 2'),
-  (4, 'greater than 2'),
   (2, 'equal to 2'),
-  (2, 'equal to 2'),
-  (3, 'greater than 2')]
?                       ^

+  (3, 'greater than 2'),
?                       ^

+  (3, 'greater than 2'),
+  (4, 'greater than 2')]

======================================================================
FAIL: test_update (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 553, in test_update
    transform=attrgetter('integer', 'string')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(1, [16 chars]'), (2, 'two'), (3, 'other'), (3, 'other'), (4[20 chars]er')] != [(1, [16 chars]'), (3, 'other'), (2, 'two'), (3, 'other'), (3[20 chars]er')]

First differing element 2:
(2, 'two')
(3, 'other')

  [(1, 'one'),
   (2, 'two'),
+  (3, 'other'),
   (2, 'two'),
   (3, 'other'),
   (3, 'other'),
-  (4, 'other'),
?              ^

+  (4, 'other')]
?              ^

-  (3, 'other')]

======================================================================
FAIL: test_update_big_integer (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 628, in test_update_big_integer
    transform=attrgetter('integer', 'big_integer')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(4, None), (3, None), (3, None), (3, None), (2, 2), (1, 1), (2, 2)] != [(1, 1), (2, 2), (3, None), (2, 2), (3, None), (3, None), (4, None)]

First differing element 0:
(4, None)
(1, 1)

- [(4, None), (3, None), (3, None), (3, None), (2, 2), (1, 1), (2, 2)]
+ [(1, 1), (2, 2), (3, None), (2, 2), (3, None), (3, None), (4, None)]

======================================================================
FAIL: test_update_boolean (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 656, in test_update_boolean
    transform=attrgetter('integer', 'boolean')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, False), (3, False), (2, True), (1, Tru[33 chars]rue)] != [(1, True), (2, True), (3, False), (2, True[33 chars]lse)]

First differing element 0:
(3, False)
(1, True)

- [(3, False),
+ [(1, True),
+  (2, True),
   (3, False),
   (2, True),
-  (1, True),
-  (4, False),
   (3, False),
-  (2, True)]
+  (3, False),
+  (4, False)]

======================================================================
FAIL: test_update_decimal (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 709, in test_update_decimal
    transform=attrgetter('integer', 'decimal')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(2, Decimal('2.2')), (3, None), (3, None),[59 chars]one)] != [(1, Decimal('1.1')), (2, Decimal('2.2')), [59 chars]one)]

First differing element 0:
(2, Decimal('2.2'))
(1, Decimal('1.1'))

+ [(1, Decimal('1.1')),
- [(2, Decimal('2.2')),
? ^

+  (2, Decimal('2.2')),
? ^

+  (3, None),
+  (2, Decimal('2.2')),
   (3, None),
   (3, None),
-  (2, Decimal('2.2')),
-  (1, Decimal('1.1')),
-  (3, None),
   (4, None)]

======================================================================
FAIL: test_update_duration (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 724, in test_update_duration
    transform=attrgetter('integer', 'duration')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(4, None), (2, datetime.timedelta(days=2))[95 chars]=1))] != [(1, datetime.timedelta(days=1)), (2, datet[95 chars]one)]

First differing element 0:
(4, None)
(1, datetime.timedelta(days=1))

- [(4, None),
+ [(1, datetime.timedelta(days=1)),
   (2, datetime.timedelta(days=2)),
   (3, None),
   (2, datetime.timedelta(days=2)),
   (3, None),
   (3, None),
-  (1, datetime.timedelta(days=1))]
+  (4, None)]

======================================================================
FAIL: test_update_email (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 738, in test_update_email
    transform=attrgetter('integer', 'email')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(4, ''), (3, ''), (3, ''), (3, ''), (2, '2[54 chars]om')] != [(1, '1@example.com'), (2, '2@example.com')[54 chars] '')]

First differing element 0:
(4, '')
(1, '1@example.com')

+ [(1, '1@example.com'),
+  (2, '2@example.com'),
- [(4, ''),
? ^ ^

+  (3, ''),
? ^ ^

+  (2, '2@example.com'),
   (3, ''),
   (3, ''),
-  (3, ''),
?   ^     ^

+  (4, '')]
?   ^     ^

-  (2, '2@example.com'),
-  (2, '2@example.com'),
-  (1, '1@example.com')]

======================================================================
FAIL: test_update_file (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 751, in test_update_file
    transform=lambda o: (o.integer, str(o.file))
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, ''), (2, '~/2'), (3, ''), (4, ''), (3, ''), (2, '~/2'), (1, '~/1')] != [(1, '~/1'), (2, '~/2'), (3, ''), (2, '~/2'), (3, ''), (3, ''), (4, '')]

First differing element 0:
(3, '')
(1, '~/1')

- [(3, ''), (2, '~/2'), (3, ''), (4, ''), (3, ''), (2, '~/2'), (1, '~/1')]
+ [(1, '~/1'), (2, '~/2'), (3, ''), (2, '~/2'), (3, ''), (3, ''), (4, '')]

======================================================================
FAIL: test_update_file_path (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 765, in test_update_file_path
    transform=attrgetter('integer', 'file_path')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, ''), (4, ''), (3, ''), (3, ''), (1, '~/1'), (2, '~/2'), (2, '~/2')] != [(1, '~/1'), (2, '~/2'), (3, ''), (2, '~/2'), (3, ''), (3, ''), (4, '')]

First differing element 0:
(3, '')
(1, '~/1')

- [(3, ''), (4, ''), (3, ''), (3, ''), (1, '~/1'), (2, '~/2'), (2, '~/2')]
+ [(1, '~/1'), (2, '~/2'), (3, ''), (2, '~/2'), (3, ''), (3, ''), (4, '')]

======================================================================
FAIL: test_update_fk (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 989, in test_update_fk
    transform=attrgetter('integer', 'fk_id')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(2, 1073281698905435642), (4, None), (2, 1[73 chars]831)] != [(1, 959121705647879831), (2, 1073281698905[73 chars]one)]

First differing element 0:
(2, 1073281698905435642)
(1, 959121705647879831)

+ [(1, 959121705647879831),
- [(2, 1073281698905435642),
? ^

+  (2, 1073281698905435642),
? ^

-  (4, None),
?   ^

+  (3, None),
?   ^

   (2, 1073281698905435642),
   (3, None),
   (3, None),
-  (3, None),
?   ^       ^

+  (4, None)]
?   ^       ^

-  (1, 959121705647879831)]

======================================================================
FAIL: test_update_float (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 778, in test_update_float
    transform=attrgetter('integer', 'float')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, None), (4, None), (2, 2.2), (2, 2.2), (3, None), (1, 1.1), (3, None)] != [(1, 1.1), (2, 2.2), (3, None), (2, 2.2), (3, None), (3, None), (4, None)]

First differing element 0:
(3, None)
(1, 1.1)

- [(3, None), (4, None), (2, 2.2), (2, 2.2), (3, None), (1, 1.1), (3, None)]
+ [(1, 1.1), (2, 2.2), (3, None), (2, 2.2), (3, None), (3, None), (4, None)]

======================================================================
FAIL: test_update_generic_ip_address (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 807, in test_update_generic_ip_address
    transform=attrgetter('integer', 'generic_ip_address')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, None), (2, '2.2.2.2'), (2, '2.2.2.2'),[44 chars]one)] != [(1, '1.1.1.1'), (2, '2.2.2.2'), (3, None),[44 chars]one)]

First differing element 0:
(3, None)
(1, '1.1.1.1')

- [(3, None),
+ [(1, '1.1.1.1'),
   (2, '2.2.2.2'),
+  (3, None),
   (2, '2.2.2.2'),
-  (1, '1.1.1.1'),
-  (4, None),
   (3, None),
-  (3, None)]
?           ^

+  (3, None),
?           ^

+  (4, None)]

======================================================================
FAIL: test_update_image (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 792, in test_update_image
    transform=lambda o: (o.integer, str(o.image))
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, ''), (1, '~/1'), (2, '~/2'), (3, ''), (3, ''), (2, '~/2'), (4, '')] != [(1, '~/1'), (2, '~/2'), (3, ''), (2, '~/2'), (3, ''), (3, ''), (4, '')]

First differing element 0:
(3, '')
(1, '~/1')

- [(3, ''), (1, '~/1'), (2, '~/2'), (3, ''), (3, ''), (2, '~/2'), (4, '')]
?  ---------                                 ---------

+ [(1, '~/1'), (2, '~/2'), (3, ''), (2, '~/2'), (3, ''), (3, ''), (4, '')]
?                                               ++++++++++++++++++


======================================================================
FAIL: test_update_null_boolean (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 820, in test_update_null_boolean
    transform=attrgetter('integer', 'null_boolean')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(4, None), (2, False), (3, None), (2, False), (3, None), (1, True), (3, None)] != [(1, True), (2, False), (3, None), (2, False), (3, None), (3, None), (4, None)]

First differing element 0:
(4, None)
(1, True)

- [(4, None), (2, False), (3, None), (2, False), (3, None), (1, True), (3, None)]
?   ^  ^^^                                                   ^  ^^^     ^

+ [(1, True), (2, False), (3, None), (2, False), (3, None), (3, None), (4, None)]
?   ^  ^^^                                                   ^  ^^^     ^


======================================================================
FAIL: test_update_null_boolean_old (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 833, in test_update_null_boolean_old
    transform=attrgetter('integer', 'null_boolean_old')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(2, False), (3, None), (3, None), (2, False), (3, None), (4, None), (1, True)] != [(1, True), (2, False), (3, None), (2, False), (3, None), (3, None), (4, None)]

First differing element 0:
(2, False)
(1, True)

- [(2, False), (3, None), (3, None), (2, False), (3, None), (4, None), (1, True)]
?                         -----------                        ^          ^  ^^^

+ [(1, True), (2, False), (3, None), (2, False), (3, None), (3, None), (4, None)]
?  +++++++++++                                               ^          ^  ^^^


======================================================================
FAIL: test_update_positive_integer (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 846, in test_update_positive_integer
    transform=attrgetter('integer', 'positive_integer')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(4, None), (3, None), (2, 2), (3, None), (2, 2), (1, 1), (3, None)] != [(1, 1), (2, 2), (3, None), (2, 2), (3, None), (3, None), (4, None)]

First differing element 0:
(4, None)
(1, 1)

- [(4, None), (3, None), (2, 2), (3, None), (2, 2), (1, 1), (3, None)]
+ [(1, 1), (2, 2), (3, None), (2, 2), (3, None), (3, None), (4, None)]

======================================================================
FAIL: test_update_positive_small_integer (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 859, in test_update_positive_small_integer
    transform=attrgetter('integer', 'positive_small_integer')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, None), (2, 2), (2, 2), (4, None), (3, None), (1, 1), (3, None)] != [(1, 1), (2, 2), (3, None), (2, 2), (3, None), (3, None), (4, None)]

First differing element 0:
(3, None)
(1, 1)

- [(3, None), (2, 2), (2, 2), (4, None), (3, None), (1, 1), (3, None)]
+ [(1, 1), (2, 2), (3, None), (2, 2), (3, None), (3, None), (4, None)]

======================================================================
FAIL: test_update_slug (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 873, in test_update_slug
    transform=attrgetter('integer', 'slug')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(4, ''), (3, ''), (2, '2'), (3, ''), (3, ''), (2, '2'), (1, '1')] != [(1, '1'), (2, '2'), (3, ''), (2, '2'), (3, ''), (3, ''), (4, '')]

First differing element 0:
(4, '')
(1, '1')

- [(4, ''), (3, ''), (2, '2'), (3, ''), (3, ''), (2, '2'), (1, '1')]
+ [(1, '1'), (2, '2'), (3, ''), (2, '2'), (3, ''), (3, ''), (4, '')]

======================================================================
FAIL: test_update_small_integer (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 886, in test_update_small_integer
    transform=attrgetter('integer', 'small_integer')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(2, 2), (4, None), (2, 2), (1, 1), (3, None), (3, None), (3, None)] != [(1, 1), (2, 2), (3, None), (2, 2), (3, None), (3, None), (4, None)]

First differing element 0:
(2, 2)
(1, 1)

- [(2, 2), (4, None), (2, 2), (1, 1), (3, None), (3, None), (3, None)]
?           ^                 --------                       ^

+ [(1, 1), (2, 2), (3, None), (2, 2), (3, None), (3, None), (4, None)]
?  ++++++++         ^                                        ^


======================================================================
FAIL: test_update_text (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 913, in test_update_text
    transform=attrgetter('integer', 'text')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, ''), (2, '2'), (1, '1'), (3, ''), (3, ''), (2, '2'), (4, '')] != [(1, '1'), (2, '2'), (3, ''), (2, '2'), (3, ''), (3, ''), (4, '')]

First differing element 0:
(3, '')
(1, '1')

- [(3, ''), (2, '2'), (1, '1'), (3, ''), (3, ''), (2, '2'), (4, '')]
+ [(1, '1'), (2, '2'), (3, ''), (2, '2'), (3, ''), (3, ''), (4, '')]

======================================================================
FAIL: test_update_time (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 928, in test_update_time
    transform=attrgetter('integer', 'time')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(1, [54 chars]ne), (3, None), (4, None), (3, None), (2, datetime.time(2, 0))] != [(1, [54 chars]ne), (2, datetime.time(2, 0)), (3, None), (3, None), (4, None)]

First differing element 3:
(3, None)
(2, datetime.time(2, 0))

  [(1, datetime.time(1, 0)),
   (2, datetime.time(2, 0)),
   (3, None),
+  (2, datetime.time(2, 0)),
   (3, None),
-  (4, None),
   (3, None),
-  (2, datetime.time(2, 0))]
+  (4, None)]

======================================================================
FAIL: test_update_url (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 945, in test_update_url
    transform=attrgetter('integer', 'url')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(4, ''), (2, 'http://2.example.com/'), (3,[78 chars] '')] != [(1, 'http://1.example.com/'), (2, 'http://[78 chars] '')]

First differing element 0:
(4, '')
(1, 'http://1.example.com/')

- [(4, ''),
+ [(1, 'http://1.example.com/'),
   (2, 'http://2.example.com/'),
   (3, ''),
   (2, 'http://2.example.com/'),
   (3, ''),
-  (1, 'http://1.example.com/'),
-  (3, '')]
?         ^

+  (3, ''),
?         ^

+  (4, '')]

======================================================================
FAIL: test_update_uuid (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 974, in test_update_uuid
    transform=attrgetter('integer', 'uuid')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, None), (1, UUID('11111111-1111-1111-11[149 chars]one)] != [(1, UUID('11111111-1111-1111-1111-11111111[149 chars]one)]

First differing element 0:
(3, None)
(1, UUID('11111111-1111-1111-1111-111111111111'))

- [(3, None),
-  (1, UUID('11111111-1111-1111-1111-111111111111')),
? ^

+ [(1, UUID('11111111-1111-1111-1111-111111111111')),
? ^

+  (2, UUID('22222222-2222-2222-2222-222222222222')),
   (3, None),
   (2, UUID('22222222-2222-2222-2222-222222222222')),
-  (2, UUID('22222222-2222-2222-2222-222222222222')),
-  (4, None),
?   ^

+  (3, None),
?   ^

-  (3, None)]
?           ^

+  (3, None),
?           ^

+  (4, None)]

======================================================================
FAIL: test_update_with_expression_as_condition (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 593, in test_update_with_expression_as_condition
    transform=attrgetter('integer', 'string')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, '+1'), (1, 'equal'), (2, '+1'), (3, '+[38 chars]al')] != [(1, 'equal'), (2, '+1'), (3, '+1'), (2, 'e[38 chars]+1')]

First differing element 0:
(3, '+1')
(1, 'equal')

- [(3, '+1'),
-  (1, 'equal'),
? ^

+ [(1, 'equal'),
? ^

   (2, '+1'),
   (3, '+1'),
   (2, 'equal'),
-  (4, '+1'),
?   ^

+  (3, '+1'),
?   ^

-  (3, 'equal')]
?              ^

+  (3, 'equal'),
?              ^

+  (4, '+1')]

======================================================================
FAIL: test_update_with_expression_as_value (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 580, in test_update_with_expression_as_value
    transform=attrgetter('string', 'integer')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [('2', 5), ('1', 2), ('3', 3), ('3', 3), ('4', 4), ('2', 5), ('3', 3)] != [('1', 2), ('2', 5), ('3', 3), ('2', 5), ('3', 3), ('3', 3), ('4', 4)]

First differing element 0:
('2', 5)
('1', 2)

- [('2', 5), ('1', 2), ('3', 3), ('3', 3), ('4', 4), ('2', 5), ('3', 3)]
+ [('1', 2), ('2', 5), ('3', 3), ('2', 5), ('3', 3), ('3', 3), ('4', 4)]

======================================================================
FAIL: test_update_without_default (expressions_case.tests.CaseExpressionTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/tests/expressions_case/tests.py", line 566, in test_update_without_default
    transform=attrgetter('integer', 'integer2')
  File "/home/tim/code/django/django/test/testcases.py", line 1056, in assertQuerysetEqual
    return self.assertEqual(list(items), values, msg=msg)
AssertionError: Lists differ: [(3, None), (2, 2), (4, None), (3, None), (3, None), (2, 2), (1, 1)] != [(1, 1), (2, 2), (3, None), (2, 2), (3, None), (3, None), (4, None)]

First differing element 0:
(3, None)
(1, 1)

- [(3, None), (2, 2), (4, None), (3, None), (3, None), (2, 2), (1, 1)]
+ [(1, 1), (2, 2), (3, None), (2, 2), (3, None), (3, None), (4, None)]

----------------------------------------------------------------------
Ran 85 tests in 1314.898s

FAILED (failures=58, errors=4)
Preserving test database for alias 'default'...
Testing against Django installed in '/home/tim/code/django/django' with up to 3 processes
System check identified no issues (0 silenced).
@odeke-em
Copy link
Contributor

odeke-em commented Mar 18, 2020

Thank you for filing this issue @timgraham!
So from my initial audit, the majority of the tests are failing because they assume a specific ordering aka perhaps serial primary key, while the others are from failed casts between DATE<->INT64, BINARY<->INT64, INT64<->TIMESTAMP and here are the categorizations

Here are the audit results:

operator <= for argument types: DATE, INT64

type INT64 cannot be assigned to binary, which has type BYTES

type INT64 cannot be assigned to date_field, which has type DATE

type INT64 cannot be assigned to date_time, which has type TIMESTAMP

unexpected ordering due to assuming a serial primary key

  • expressions_case.tests.CaseDocumentationExamples.test_conditional_update_example
  • expressions_case.tests.CaseDocumentationExamples.test_simple_example
  • expressions_case.tests.CaseExpressionTests.test_annotate
  • expressions_case.tests.CaseExpressionTests.test_annotate_exclude
  • expressions_case.tests.CaseExpressionTests.test_annotate_with_aggregation_in_condition
  • expressions_case.tests.CaseExpressionTests.test_annotate_with_aggregation_in_predicate
  • expressions_case.tests.CaseExpressionTests.test_annotate_with_aggregation_in_value
  • expressions_case.tests.CaseExpressionTests.test_annotate_with_annotation_in_condition
  • expressions_case.tests.CaseExpressionTests.test_annotate_with_annotation_in_predicate
  • expressions_case.tests.CaseExpressionTests.test_annotate_with_annotation_in_value
  • expressions_case.tests.CaseExpressionTests.test_annotate_with_expression_as_condition
  • expressions_case.tests.CaseExpressionTests.test_annotate_with_expression_as_value
  • expressions_case.tests.CaseExpressionTests.test_annotate_with_in_clause
  • expressions_case.tests.CaseExpressionTests.test_annotate_with_join_in_condition
  • expressions_case.tests.CaseExpressionTests.test_annotate_with_join_in_predicate
  • expressions_case.tests.CaseExpressionTests.test_annotate_with_join_in_value
  • expressions_case.tests.CaseExpressionTests.test_annotate_without_default
  • expressions_case.tests.CaseExpressionTests.test_combined_expression
  • expressions_case.tests.CaseExpressionTests.test_combined_q_object
  • expressions_case.tests.CaseExpressionTests.test_filter
  • expressions_case.tests.CaseExpressionTests.test_filter_with_aggregation_in_condition
  • expressions_case.tests.CaseExpressionTests.test_filter_with_aggregation_in_predicate
  • expressions_case.tests.CaseExpressionTests.test_filter_with_aggregation_in_value
  • expressions_case.tests.CaseExpressionTests.test_filter_with_annotation_in_condition
  • expressions_case.tests.CaseExpressionTests.test_filter_with_annotation_in_predicate
  • expressions_case.tests.CaseExpressionTests.test_filter_with_expression_as_condition
  • expressions_case.tests.CaseExpressionTests.test_filter_with_expression_as_value
  • expressions_case.tests.CaseExpressionTests.test_filter_with_join_in_condition
  • expressions_case.tests.CaseExpressionTests.test_filter_with_join_in_predicate
  • expressions_case.tests.CaseExpressionTests.test_filter_without_default
  • expressions_case.tests.CaseExpressionTests.test_in_subquery
  • expressions_case.tests.CaseExpressionTests.test_lookup_different_fields
  • expressions_case.tests.CaseExpressionTests.test_lookup_in_condition
  • expressions_case.tests.CaseExpressionTests.test_update
  • expressions_case.tests.CaseExpressionTests.test_update_big_integer
  • expressions_case.tests.CaseExpressionTests.test_update_decimal
  • expressions_case.tests.CaseExpressionTests.test_update_duration
  • expressions_case.tests.CaseExpressionTests.test_update_email
  • expressions_case.tests.CaseExpressionTests.test_update_file
  • expressions_case.tests.CaseExpressionTests.test_update_file_path
  • expressions_case.tests.CaseExpressionTests.test_update_fk
  • expressions_case.tests.CaseExpressionTests.test_update_float
  • expressions_case.tests.CaseExpressionTests.test_update_generic_ip_address
  • expressions_case.tests.CaseExpressionTests.test_update_image
  • expressions_case.tests.CaseExpressionTests.test_update_null_boolean
  • expressions_case.tests.CaseExpressionTests.test_update_null_boolean_old
  • expressions_case.tests.CaseExpressionTests.test_update_positive_integer
  • expressions_case.tests.CaseExpressionTests.test_update_positive_small_integer
  • expressions_case.tests.CaseExpressionTests.test_update_slug
  • expressions_case.tests.CaseExpressionTests.test_update_small_integer
  • expressions_case.tests.CaseExpressionTests.test_update_text
  • expressions_case.tests.CaseExpressionTests.test_update_time
  • expressions_case.tests.CaseExpressionTests.test_update_url
  • expressions_case.tests.CaseExpressionTests.test_update_uuid
  • expressions_case.tests.CaseExpressionTests.test_update_with_expression_as_condition
  • expressions_case.tests.CaseExpressionTests.test_update_with_expression_as_value
  • expressions_case.tests.CaseExpressionTests.test_update_without_default

@odeke-em
Copy link
Contributor

@timgraham I've added a skip for the 57 expression_case tests that assume a serial primary key and ordering of results in b431999, so this issue can be closed as the other 4 related have been separately filed.

@timgraham
Copy link
Contributor Author

Rather than skip those tests, I believe we should instead add a commit to the Django fork to relax the assertions to ignore ordering (where possible). I would have preferred doing this all in one commit (with a proper review) like in #348. It would also be nice to make those issues more descriptive rather than just pasting a traceback without a description of what the problem is.

@odeke-em
Copy link
Contributor

Rather than skip those tests, I believe we should instead add a commit to the Django fork to relax the assertions to ignore ordering (where possible)
I would have preferred doing this all in one commit (with a proper review) like in #348.

Interesting. I thought that since we already had all the serial primary key skips in for a long time that we’d add them too here which is why I added the commit, but also a 3hr long wait before a confirmed case seemed like overkill.

It would also be nice to make those issues more descriptive rather than just pasting a traceback without a description of what the problem is.

Thanks, I’ll try more but I described the problems in the titles or was there something specifically different? Please help me out with edits as you’ve got the most Django context and know these things the most.

Just the pressure from the past overdue deadline getting the most out of me as we need to ship out before March 30th, which is why for confirmed cases, I have been skipping the unproductive wait times.

@timgraham timgraham self-assigned this Mar 18, 2020
timgraham added a commit that referenced this issue Mar 19, 2020
timgraham added a commit that referenced this issue Mar 19, 2020
timgraham added a commit that referenced this issue Mar 19, 2020
timgraham added a commit that referenced this issue Mar 19, 2020
timgraham added a commit that referenced this issue Mar 20, 2020
timgraham added a commit that referenced this issue Mar 20, 2020
timgraham added a commit that referenced this issue Mar 25, 2020
timgraham added a commit that referenced this issue Mar 25, 2020
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
django-test-suite 🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants