Code

Opened 7 years ago

Closed 7 years ago

#4711 closed (invalid)

Test 'datatypes' fails, BooleanFields are inconsistent under different backends

Reported by: mir@… Owned by: adrian
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The regression test 'datatypes' fails with mysql. Under mysql, a BooleanField always has a value of 0 or 1, not False or True.

The test entered the test suite in [5046] as part of the boulder-oracle-sprint branch.

Here's the output from the test run:

======================================================================
FAIL: Doctest: regressiontests.datatypes.models.__test__.API_TESTS
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mir/lib/python/django/test/_doctest.py", line 2161, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for regressiontests.datatypes.models.__test__.API_TESTS
  File "/home/mir/src/django/trunk/tests/regressiontests/datatypes/models.py", line unknown line number, in API_TESTS

----------------------------------------------------------------------
File "/home/mir/src/django/trunk/tests/regressiontests/datatypes/models.py", line ?, in regressiontests.datatypes.models.__test__.API_TESTS
Failed example:
    d2.is_frosted
Expected:
    False
Got:
    0
----------------------------------------------------------------------
File "/home/mir/src/django/trunk/tests/regressiontests/datatypes/models.py", line ?, in regressiontests.datatypes.models.__test__.API_TESTS
Failed example:
    d2.has_sprinkles
Expected:
    True
Got:
    1

Attachments (0)

Change History (2)

comment:1 Changed 7 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 7 years ago by mtredinnick

  • Resolution set to invalid
  • Status changed from new to closed

Those lines of code have never existed in trunk (see [5519]). Looks like your source checkout is mixed up with the boulder-sprint branch somehow.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.