Add test_split_vim_to_owner_region
[multicloud/framework.git] / multivimbroker / multivimbroker / tests / test_extsys.py
1 # Copyright (c) 2017-2018 VMware, Inc.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #       http://www.apache.org/licenses/LICENSE-2.0
6 #
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS,
9 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
11 import unittest
12
13 from multivimbroker.pub.msapi import extsys
14
15
16 class TestExtsys(unittest.TestCase):
17
18     def test_split_vim_to_owner_region(self):
19         vim_id = "openstack_regionone"
20         cloud_owner, cloud_region = extsys.split_vim_to_owner_region(vim_id)
21         self.assertEqual("openstack", cloud_owner)
22         self.assertEqual("regionone", cloud_region)