Merge "Remove get_repo_tag"
[functest.git] / functest / tests / unit / vnf / ims / test_ims_base.py
1 #!/usr/bin/env python
2
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7
8 import logging
9 import unittest
10
11 import mock
12
13 from functest.opnfv_tests.vnf.ims import clearwater_ims_base as ims_base
14
15
16 class ClearwaterOnBoardingBaseTesting(unittest.TestCase):
17
18     def setUp(self):
19         with mock.patch('functest.opnfv_tests.vnf.ims.cloudify_ims.'
20                         'os.makedirs'):
21             self.ims_vnf = ims_base.ClearwaterOnBoardingBase()
22
23         self.mock_post = mock.Mock()
24         attrs = {'status_code': 201,
25                  'cookies': ""}
26         self.mock_post.configure_mock(**attrs)
27
28         self.mock_post_200 = mock.Mock()
29         attrs = {'status_code': 200,
30                  'cookies': ""}
31         self.mock_post_200.configure_mock(**attrs)
32
33         self.mock_post_500 = mock.Mock()
34         attrs = {'status_code': 500,
35                  'cookies': ""}
36         self.mock_post_200.configure_mock(**attrs)
37
38 if __name__ == "__main__":
39     logging.disable(logging.CRITICAL)
40     unittest.main(verbosity=2)