Unit test for loading valid URL

Bug #1514987 reported by Sahdev Zala
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TOSCA Parser
New
Low
Lakshmi Prasanna

Bug Description

The test_utils.py method def test_load_url_errors(self): fails on local test machines running tox where URL gets redirected by internet service provider.
The failure is due to the fact that since URL gets redirected, the urllib2.urlopen(path) used in the test method doesn't throw error as expected.
urllib2.urlopen(path)
<addinfourl at 140144329349888 whose fp = <socket._fileobject object at 0x7f75e652f8d0>>
vs
urllib2.urlopen("http://www.badurl.")
*** URLError: <urlopen error [Errno -2] Name or service not known>

For now the test has been modified under https://review.openstack.org/#/c/243750/2

If we find a way to create a test with valid url, we should create a new similar test.

Sahdev Zala (spzala)
Changed in tosca-parser:
importance: Undecided → Low
Suresh (suresh-palemoni)
Changed in tosca-parser:
assignee: nobody → Suresh (suresh-palemoni)
assignee: Suresh (suresh-palemoni) → nobody
Changed in tosca-parser:
assignee: nobody → Lakshmi Prasanna (lakshmiprasanna-m)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.