Opened 4 years ago

Closed 3 years ago

#16816 closed Bug (fixed)

URLField validation mock added in r16451 neutered by changes from r16760

Reported by: ramiro Owned by: nobody
Component: Testing framework Version: master
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 4 years ago.
16816.verify-exists-test-mock.2.diff (3.4 KB) - added by julien 4 years ago.
16816.verify-exists-test-mock.3.diff (3.6 KB) - added by julien 3 years ago.
16816.verify-exists-test-mock.4.diff (4.4 KB) - added by julien 3 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 Changed 4 years ago by Alex

  • Severity changed from Normal to Release blocker
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 4 years ago by jacob

  • milestone 1.4 deleted

Milestone 1.4 deleted

Changed 4 years ago by julien

Changed 4 years ago by julien

comment:3 Changed 3 years ago by anonymous

  • Triage Stage changed from Accepted to Ready for checkin

comment:4 Changed 3 years ago by anonymous

  • Triage Stage changed from Ready for checkin to Accepted

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

Changed 3 years ago by julien

comment:5 Changed 3 years ago by julien

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.

Changed 3 years ago by julien

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 Changed 3 years ago by julien

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

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