summaryrefslogtreecommitdiffstats
path: root/apex/tests/test_apex_undercloud_builder.py
diff options
context:
space:
mode:
Diffstat (limited to 'apex/tests/test_apex_undercloud_builder.py')
-rw-r--r--apex/tests/test_apex_undercloud_builder.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/apex/tests/test_apex_undercloud_builder.py b/apex/tests/test_apex_undercloud_builder.py
new file mode 100644
index 00000000..c7498880
--- /dev/null
+++ b/apex/tests/test_apex_undercloud_builder.py
@@ -0,0 +1,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