summaryrefslogtreecommitdiffstats
path: root/apex/tests/test_apex_undercloud_builder.py
blob: c74988807af0ca99a81e25d03d3f755b0aceb934 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
##############################################################################
# Copyright (c) 2017 Tim Rozet (Red Hat)
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

import unittest

from apex.builders import undercloud_builder as uc_builder
from mock import patch


class TestUndercloudBuilder(unittest.TestCase):
    @classmethod
    def setup_class(cls):
        """This method is run once for each class before any tests are run"""

    @classmethod
    def teardown_class(cls):
        """This method is run once for each class _after_ all tests are run"""

    def setup(self):
        """This method is run once before _each_ test method is executed"""

    def teardown(self):
        """This method is run once after _each_ test method is executed"""

    @patch('apex.virtual.utils.virt_customize')
    def test_add_upstream_pkgs(self, mock_customize):
        uc_builder.add_upstream_packages('dummy.qcow2')
        assert mock_customize.called