Opened 14 years ago
Closed 14 years ago
#16189 closed Cleanup/optimization (fixed)
Tests with URLField(verify_exists=True) should use a mock and not access the internet directly.
Reported by: | Gregor Müllegger | Owned by: | Gregor Müllegger |
---|---|---|---|
Component: | Testing framework | Version: | 1.3 |
Severity: | Normal | Keywords: | verify_exists |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Currently the testsuite tries to hit some domains to test the verify_exists=True behaviour of URLFields. However unittests should not require any external resources.
urllib2.urlopen should be mocked in the tests to provide faster and more reliable tests.
Attachments (1)
Change History (5)
by , 14 years ago
Attachment: | ticket16189.1.diff added |
---|
comment:1 by , 14 years ago
Triage Stage: | Unreviewed → Accepted |
---|
Patch looks good, it applies without problem. The tests pass.
comment:2 by , 14 years ago
comment:3 by , 14 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:4 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Don't require access to the internet while running tests.