Stop bringing the test environment into the mocks
Change-Id: I1780f186cf107242cacd6d3da7a5bc81a330b536 Closes-Bug: #1883224
This commit is contained in:
parent
2e6a7f949c
commit
8f57ed9b9e
@ -73,7 +73,7 @@ class TestPackageInstall(base.BaseTestCase):
|
|||||||
|
|
||||||
self.assertThat(result, IsMatchingInstallList(expected))
|
self.assertThat(result, IsMatchingInstallList(expected))
|
||||||
|
|
||||||
@mock.patch.object(os, 'environ', dict(ARCH='arm64', **os.environ))
|
@mock.patch.object(os, 'environ', dict(ARCH='arm64'))
|
||||||
def test_arch(self):
|
def test_arch(self):
|
||||||
'''Exercise the arch and not-arch flags'''
|
'''Exercise the arch and not-arch flags'''
|
||||||
objs = {
|
objs = {
|
||||||
@ -125,8 +125,7 @@ class TestPackageInstall(base.BaseTestCase):
|
|||||||
with mock.patch.object(os, 'environ',
|
with mock.patch.object(os, 'environ',
|
||||||
dict(ARCH=arch,
|
dict(ARCH=arch,
|
||||||
DIB_UBUNTU_KERNEL='linux-image-generic',
|
DIB_UBUNTU_KERNEL='linux-image-generic',
|
||||||
DIB_RELEASE=release,
|
DIB_RELEASE=release)):
|
||||||
**os.environ)):
|
|
||||||
result = installs_squash.collect_data(
|
result = installs_squash.collect_data(
|
||||||
self.final_dict, self.kernel_objs, 'test_element')
|
self.final_dict, self.kernel_objs, 'test_element')
|
||||||
|
|
||||||
@ -192,8 +191,7 @@ class TestPackageInstall(base.BaseTestCase):
|
|||||||
dict(
|
dict(
|
||||||
DIB_A_FEATURE='1',
|
DIB_A_FEATURE='1',
|
||||||
DIB_B_FEATURE='1',
|
DIB_B_FEATURE='1',
|
||||||
DIB_C_FEATURE='1',
|
DIB_C_FEATURE='1'))
|
||||||
**os.environ))
|
|
||||||
def test_skip_when_list(self):
|
def test_skip_when_list(self):
|
||||||
'''Exercise the when flag with lists'''
|
'''Exercise the when flag with lists'''
|
||||||
objs = {
|
objs = {
|
||||||
|
Loading…
Reference in New Issue
Block a user