
Instead of a separate cloudinit.test package. Change-Id: I6ea05a0f57c93a944f435f306a064d918fd26152
22 lines
598 B
Python
22 lines
598 B
Python
# Copyright 2015 Canonical Ltd.
|
|
# This file is part of cloud-init. See LICENCE file for license information.
|
|
#
|
|
# vi: ts=4 expandtab
|
|
|
|
import httpretty
|
|
import testtools
|
|
|
|
|
|
class TestCase(testtools.TestCase):
|
|
"""Base class for all cloud-init test cases."""
|
|
|
|
def setUp(self):
|
|
super(TestCase, self).setUp()
|
|
# Do not allow any unknown network connections to get triggered...
|
|
httpretty.HTTPretty.allow_net_connect = False
|
|
|
|
def tearDown(self):
|
|
super(TestCase, self).tearDown()
|
|
# Ok allow it again....
|
|
httpretty.HTTPretty.allow_net_connect = True
|