Opened 13 years ago

Closed 13 years ago

#16816 closed Bug (fixed)

URLField validation mock added in r16451 neutered by changes from r16760

Reported by: Ramiro Morales Owned by: nobody
Component: Testing framework Version: dev
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The mocking is done so the test suite doesn't depend on Internet connectivity. We need to update the strategy we use to accompany the new implementation of the validation code.

Attachments (4)

16816.verify-exists-test-mock.diff (2.0 KB ) - added by Julien Phalip 13 years ago.
16816.verify-exists-test-mock.2.diff (3.4 KB ) - added by Julien Phalip 13 years ago.
16816.verify-exists-test-mock.3.diff (3.6 KB ) - added by Julien Phalip 13 years ago.
16816.verify-exists-test-mock.4.diff (4.4 KB ) - added by Julien Phalip 13 years ago.
Small tweak to the previous patch. Not sure where to move verify_exists_urls() to avoid doing that ugly relative import in validation/tests.py

Download all attachments as: .zip

Change History (10)

comment:1 by Alex Gaynor, 13 years ago

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

comment:2 by Jacob, 13 years ago

milestone: 1.4

Milestone 1.4 deleted

by Julien Phalip, 13 years ago

by Julien Phalip, 13 years ago

comment:3 by anonymous, 13 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by anonymous, 13 years ago

Triage Stage: Ready for checkinAccepted

Moving back to accepted because it works on Python 2.5 but fails with 2.6 and 2.7

by Julien Phalip, 13 years ago

comment:5 by Julien Phalip, 13 years ago

The failures in Python > 2.5 were due to the fact that urllib2.OpenerDirector.open() has an extra timeout parameter. I've added it to the mock open() method and that seems to fix it.

by Julien Phalip, 13 years ago

Small tweak to the previous patch. Not sure where to move verify_exists_urls() to avoid doing that ugly relative import in validation/tests.py

comment:6 by Julien Phalip, 13 years ago

Resolution: fixed
Status: newclosed

In [17059]:

Fixed #16816 -- Tweaked the test mock for URLField.verify_exists to allow tests to pass when there is no Internet connection available. Many thanks to Ramiro Morales, Aymeric Augustin and Florian Apolloner for the patch reviews.

Note: See TracTickets for help on using tickets.
Back to Top