Django unittest failure

Showing 1-6 of 6 messages
Django unittest failure Ryan Boggs 9/14/13 3:35 PM
Hi,

I am trying to update Django in OpenBSD ports and I am experiencing a unit test failure when testing django 1.5.2/1.5.3 on the latest snapshot of OpenBSD.  The failure is with test:
django.contrib.formtools.tests.wizard.wizardtests.tests.WizardFormKwargsOverrideTests.test_instance_is_maintained
AssertionError: 2 != 3

I've attached a screenshot with more details regarding this failure if it can be helpful.  This failure was not present with version 1.5.1.  Does anyone know if a setting needs to be adjusted that I may be missing?

Please let me know if more details are needed.

Thanks,
Ryan
Re: Django unittest failure WongoBongo 9/14/13 5:47 PM
Are you reusing an old database or something? There should be only two users in the database prior to testing that section.

# Create two users so we can filter by is_staff when handing our
# wizard a queryset keyword argument.
self.normal_user = User.objects.create(username='test1', email='nor...@example.com')
self.staff_user = User.objects.create(username='test2', email='st...@example.com', is_staff=True)

See line 369


K



On Saturday, September 14, 2013 3:35:06 PM UTC-7, Ryan Boggs wrote:

AssertionError: 2 != 3
Re: Django unittest failure Ryan Boggs 9/14/13 9:57 PM
Hi,

Thank you for responding.

We are using the test_sqlite.py as the settings file for the regression tests, which I believe should be creating new sqlite databases in memory.  So there shouldn't be any old database files being used.

We are using the same procedure as we did with 1.5.1 and I didn't see any test failures with that version on OpenBSD.

Thanks,
Ryan
Re: Django unittest failure Ryan Boggs 9/15/13 12:30 PM
FYI,

Just tried with 1.5.4 and the same test is still failing.

Thanks,
Ryan
Re: Django unittest failure WongoBongo 9/16/13 7:16 PM
You should probably open a bug on this issue. The test suite fails for me on MacOS/Python 2.7 on the stable/1.5.x branch. This is the command that fails reliably on my machine:

$ PYTHONPATH=..:$PYTHONPATH python ./runtests.py --settings=test_sqlite utils formtools

It might be related to this addition


The user created by this line (l.129):

user = User.objects.create_user('johndoe', 'jo...@example.com', 'pass')

... persists into subsequent WizardFormKwargsOverrideTests tests on the stable/1.5.x branch

Running the individual test for 'formtools' passes without issue.

K


On Sunday, September 15, 2013 12:30:54 PM UTC-7, Ryan Boggs wrote:
FYI,

Just tried with 1.5.4 and the same test is still failing.

Thanks,
Ryan
Re: Django unittest failure Ryan Boggs 9/17/13 7:18 PM
I reported it.  #21118.

Thanks for taking a look at this.

Thanks,
Ryan