Adds ability to deploy from upstream openstack
[apex.git] / apex / tests / test_apex_undercloud_builder.py
1 ##############################################################################
2 # Copyright (c) 2017 Tim Rozet (Red Hat)
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 import unittest
11
12 from apex.builders import undercloud_builder as uc_builder
13 from mock import patch
14
15
16 class TestUndercloudBuilder(unittest.TestCase):
17     @classmethod
18     def setup_class(cls):
19         """This method is run once for each class before any tests are run"""
20
21     @classmethod
22     def teardown_class(cls):
23         """This method is run once for each class _after_ all tests are run"""
24
25     def setup(self):
26         """This method is run once before _each_ test method is executed"""
27
28     def teardown(self):
29         """This method is run once after _each_ test method is executed"""
30
31     @patch('apex.virtual.utils.virt_customize')
32     def test_add_upstream_pkgs(self, mock_customize):
33         uc_builder.add_upstream_packages('dummy.qcow2')
34         assert mock_customize.called