~ubuntu-branches/ubuntu/trusty/heat/trusty-security

« back to all changes in this revision

Viewing changes to heat/tests/test_urlfetch.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Yolanda Robla, Chuck Short
  • Date: 2013-07-22 16:22:29 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130722162229-zzvfu40id94ii0hc
Tags: 2013.2~b2-0ubuntu1
[ Yolanda Robla ]
* debian/tests: added autopkg tests

[ Chuck Short ]
* New upstream release
* debian/control:
  - Add python-pbr to build-depends.
  - Add python-d2to to build-depends.
  - Dropped python-argparse.
  - Add python-six to build-depends.
  - Dropped python-sendfile.
  - Dropped python-nose.
  - Added testrepository.
  - Added python-testtools.
* debian/rules: Run testrepository instead of nosetets.
* debian/patches/removes-lxml-version-limitation-from-pip-requires.patch: Dropped
  no longer needed.
* debian/patches/fix-package-version-detection-when-building-doc.patch: Dropped
  no longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
#    License for the specific language governing permissions and limitations
14
14
#    under the License.
15
15
 
16
 
import mox
17
 
from nose.plugins.attrib import attr
18
16
import StringIO
19
 
import unittest
20
17
import urllib2
21
18
 
22
19
from heat.common import urlfetch
23
 
 
24
 
 
25
 
@attr(tag=['unit', 'urlfetch'])
26
 
@attr(speed='fast')
27
 
class UrlFetchTest(unittest.TestCase):
 
20
from heat.tests.common import HeatTestCase
 
21
 
 
22
 
 
23
class UrlFetchTest(HeatTestCase):
28
24
    def setUp(self):
29
 
        self.m = mox.Mox()
 
25
        super(UrlFetchTest, self).setUp()
30
26
        self.m.StubOutWithMock(urllib2, 'urlopen')
31
27
 
32
 
    def tearDown(self):
33
 
        self.m.UnsetStubs()
34
 
 
35
28
    def test_file_scheme(self):
36
29
        self.m.ReplayAll()
37
30
        self.assertRaises(IOError, urlfetch.get, 'file:///etc/profile')