Adding missing variable
[osm/RO.git] / RO-VIM-openstack / osm_rovim_openstack / tests / test_vimconn_openstack.py
index be60c36..1c6a40b 100644 (file)
@@ -2671,6 +2671,7 @@ class TestNewVmInstance(unittest.TestCase):
         """Prepare disks for VM instance successfully."""
         existing_vim_volumes = []
         created_items = {}
+        block_device_mapping = {}
         vm_av_zone = ["nova"]
 
         mock_root_volumes.return_value = root_vol_id
@@ -2679,7 +2680,12 @@ class TestNewVmInstance(unittest.TestCase):
         self.vimconn.cinder = CopyingMock()
 
         self.vimconn._prepare_disk_for_vminstance(
-            name, existing_vim_volumes, created_items, vm_av_zone, disk_list2
+            name,
+            existing_vim_volumes,
+            created_items,
+            vm_av_zone,
+            block_device_mapping,
+            disk_list2,
         )
         self.vimconn.cinder.volumes.set_bootable.assert_called_once_with(
             root_vol_id, True
@@ -2722,6 +2728,7 @@ class TestNewVmInstance(unittest.TestCase):
         existing_vim_volumes = []
         created_items = {}
         vm_av_zone = ["nova"]
+        block_device_mapping = {}
 
         mock_root_volumes.return_value = root_vol_id
         mock_created_vol_availability.return_value = 1700
@@ -2729,7 +2736,12 @@ class TestNewVmInstance(unittest.TestCase):
 
         with self.assertRaises(VimConnException) as err:
             self.vimconn._prepare_disk_for_vminstance(
-                name, existing_vim_volumes, created_items, vm_av_zone, disk_list2
+                name,
+                existing_vim_volumes,
+                created_items,
+                vm_av_zone,
+                block_device_mapping,
+                disk_list2,
             )
         self.assertEqual(
             str(err.exception), "Timeout creating volumes for instance basicvm"
@@ -2774,12 +2786,18 @@ class TestNewVmInstance(unittest.TestCase):
         """Disk list is empty."""
         existing_vim_volumes = []
         created_items = {}
+        block_device_mapping = {}
         vm_av_zone = ["nova"]
         mock_created_vol_availability.return_value = 2
         mock_existing_vol_availability.return_value = 3
 
         self.vimconn._prepare_disk_for_vminstance(
-            name, existing_vim_volumes, created_items, vm_av_zone, disk_list
+            name,
+            existing_vim_volumes,
+            created_items,
+            vm_av_zone,
+            block_device_mapping,
+            disk_list,
         )
         self.vimconn.cinder.volumes.set_bootable.assert_not_called()
         mock_created_vol_availability.assert_called_once_with(0, created_items)
@@ -2802,6 +2820,7 @@ class TestNewVmInstance(unittest.TestCase):
         existing_vim_volumes = []
         created_items = {}
         vm_av_zone = ["nova"]
+        block_device_mapping = {}
 
         mock_root_volumes.side_effect = Exception()
         mock_created_vol_availability.return_value = 10
@@ -2809,7 +2828,12 @@ class TestNewVmInstance(unittest.TestCase):
 
         with self.assertRaises(Exception):
             self.vimconn._prepare_disk_for_vminstance(
-                name, existing_vim_volumes, created_items, vm_av_zone, disk_list2
+                name,
+                existing_vim_volumes,
+                created_items,
+                vm_av_zone,
+                block_device_mapping,
+                disk_list2,
             )
         self.vimconn.cinder.volumes.set_bootable.assert_not_called()
         mock_created_vol_availability.assert_not_called()
@@ -2840,13 +2864,19 @@ class TestNewVmInstance(unittest.TestCase):
         existing_vim_volumes = []
         created_items = {}
         vm_av_zone = ["nova"]
+        block_device_mapping = {}
 
         mock_root_volumes.return_value = root_vol_id
         mock_non_root_volumes.side_effect = Exception
 
         with self.assertRaises(Exception):
             self.vimconn._prepare_disk_for_vminstance(
-                name, existing_vim_volumes, created_items, vm_av_zone, disk_list2
+                name,
+                existing_vim_volumes,
+                created_items,
+                vm_av_zone,
+                block_device_mapping,
+                disk_list2,
             )
         self.vimconn.cinder.volumes.set_bootable.assert_not_called()
         mock_created_vol_availability.assert_not_called()
@@ -4021,6 +4051,7 @@ class TestNewVmInstance(unittest.TestCase):
             existing_vim_volumes=[],
             created_items={},
             vm_av_zone="nova",
+            block_device_mapping={},
             disk_list=disk_list2,
         )
         self.vimconn.nova.servers.create.assert_called_once_with(
@@ -4033,7 +4064,7 @@ class TestNewVmInstance(unittest.TestCase):
             key_name="my_keypair",
             userdata="userdata",
             config_drive=True,
-            block_device_mapping=None,
+            block_device_mapping={},
             scheduler_hints={},
         )
         mock_time.assert_called_once()
@@ -4187,6 +4218,7 @@ class TestNewVmInstance(unittest.TestCase):
             existing_vim_volumes=[],
             created_items={},
             vm_av_zone="nova",
+            block_device_mapping={},
             disk_list=disk_list2,
         )
         self.vimconn.nova.servers.create.assert_called_once_with(
@@ -4199,7 +4231,7 @@ class TestNewVmInstance(unittest.TestCase):
             key_name="my_keypair",
             userdata="userdata",
             config_drive=True,
-            block_device_mapping=None,
+            block_device_mapping={},
             scheduler_hints={},
         )
         mock_time.assert_called_once()
@@ -4281,6 +4313,7 @@ class TestNewVmInstance(unittest.TestCase):
             existing_vim_volumes=[],
             created_items={},
             vm_av_zone="nova",
+            block_device_mapping={},
             disk_list=disk_list2,
         )
         self.vimconn.nova.servers.create.assert_called_once_with(
@@ -4293,7 +4326,7 @@ class TestNewVmInstance(unittest.TestCase):
             key_name="my_keypair",
             userdata="userdata",
             config_drive=True,
-            block_device_mapping=None,
+            block_device_mapping={},
             scheduler_hints={"group": "38b73-e9cc-5a6a-t270-82cc4811bd4a"},
         )
         mock_time.assert_called_once()
@@ -4374,6 +4407,7 @@ class TestNewVmInstance(unittest.TestCase):
             existing_vim_volumes=[],
             created_items={},
             vm_av_zone="nova",
+            block_device_mapping={},
             disk_list=disk_list2,
         )
 
@@ -4387,7 +4421,7 @@ class TestNewVmInstance(unittest.TestCase):
             key_name="my_keypair",
             userdata="userdata",
             config_drive=True,
-            block_device_mapping=None,
+            block_device_mapping={},
             scheduler_hints={},
         )
         mock_time.assert_not_called()
@@ -5474,6 +5508,7 @@ class TestNewFlavor(unittest.TestCase):
         for mocking in mocks:
             mocking.assert_not_called()
 
+    @patch.object(vimconnector, "process_vio_numa_nodes", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_memory", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_vcpu", new_callable=CopyingMock())
     @patch.object(
@@ -5490,6 +5525,7 @@ class TestNewFlavor(unittest.TestCase):
         mock_process_numa_paired_threads,
         mock_process_numa_vcpu,
         mock_process_numa_memory,
+        mock_process_vio_numa_nodes,
     ):
         """Process numa parameters, id, memory, vcpu exist, vim type is VIO,
         paired-threads, cores, threads do not exist in numa.
@@ -5501,8 +5537,6 @@ class TestNewFlavor(unittest.TestCase):
         extra_specs = {}
         expected_extra_specs = {
             "hw:numa_nodes": "2",
-            "vmware:extra_config": '{"numa.nodeAffinity":"0"}',
-            "vmware:latency_sensitivity_level": "high",
             "hw:cpu_sockets": "2",
         }
         self.vimconn.vim_type = "VIO"
@@ -5510,6 +5544,7 @@ class TestNewFlavor(unittest.TestCase):
 
         self.assertEqual(mock_process_numa_memory.call_count, 2)
         self.assertEqual(mock_process_numa_vcpu.call_count, 2)
+        mock_process_vio_numa_nodes.assert_called_once_with(2, {"hw:numa_nodes": "2"})
         _call_mock_process_numa_memory = mock_process_numa_memory.call_args_list
         self.assertEqual(
             _call_mock_process_numa_memory[0].args,
@@ -5518,8 +5553,6 @@ class TestNewFlavor(unittest.TestCase):
                 0,
                 {
                     "hw:numa_nodes": "2",
-                    "vmware:extra_config": '{"numa.nodeAffinity":"0"}',
-                    "vmware:latency_sensitivity_level": "high",
                 },
             ),
         )
@@ -5531,8 +5564,6 @@ class TestNewFlavor(unittest.TestCase):
                 {
                     "hw:cpu_sockets": "2",
                     "hw:numa_nodes": "2",
-                    "vmware:extra_config": '{"numa.nodeAffinity":"0"}',
-                    "vmware:latency_sensitivity_level": "high",
                 },
             ),
         )
@@ -5544,8 +5575,6 @@ class TestNewFlavor(unittest.TestCase):
                 0,
                 {
                     "hw:numa_nodes": "2",
-                    "vmware:extra_config": '{"numa.nodeAffinity":"0"}',
-                    "vmware:latency_sensitivity_level": "high",
                 },
             ),
         )
@@ -5557,8 +5586,6 @@ class TestNewFlavor(unittest.TestCase):
                 {
                     "hw:cpu_sockets": "2",
                     "hw:numa_nodes": "2",
-                    "vmware:extra_config": '{"numa.nodeAffinity":"0"}',
-                    "vmware:latency_sensitivity_level": "high",
                 },
             ),
         )
@@ -5571,6 +5598,7 @@ class TestNewFlavor(unittest.TestCase):
             ]
         )
 
+    @patch.object(vimconnector, "process_vio_numa_nodes", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_memory", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_vcpu", new_callable=CopyingMock())
     @patch.object(
@@ -5587,6 +5615,7 @@ class TestNewFlavor(unittest.TestCase):
         mock_process_numa_paired_threads,
         mock_process_numa_vcpu,
         mock_process_numa_memory,
+        mock_process_vio_numa_nodes,
     ):
         """Process numa parameters, id, memory, vcpu exist, vim type is openstack,
         paired-threads, cores, threads do not exist in numa.
@@ -5648,6 +5677,7 @@ class TestNewFlavor(unittest.TestCase):
             ]
         )
 
+    @patch.object(vimconnector, "process_vio_numa_nodes", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_memory", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_vcpu", new_callable=CopyingMock())
     @patch.object(
@@ -5664,6 +5694,7 @@ class TestNewFlavor(unittest.TestCase):
         mock_process_numa_paired_threads,
         mock_process_numa_vcpu,
         mock_process_numa_memory,
+        mock_process_vio_numa_nodes,
     ):
         """Process numa parameters, id, paired-threads exist, vim type is openstack.
         vcpus calculation according to paired-threads in numa, there is extra_spec.
@@ -5705,6 +5736,7 @@ class TestNewFlavor(unittest.TestCase):
         )
         self.assertDictEqual(extra_specs, expected_extra_specs)
 
+    @patch.object(vimconnector, "process_vio_numa_nodes", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_memory", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_vcpu", new_callable=CopyingMock())
     @patch.object(
@@ -5721,6 +5753,7 @@ class TestNewFlavor(unittest.TestCase):
         mock_process_numa_paired_threads,
         mock_process_numa_vcpu,
         mock_process_numa_memory,
+        mock_process_vio_numa_nodes,
     ):
         """Process numa parameters, id, paired-threads exist, vim type is VIO.
         vcpus calculation according to paired-threads in numa, there is extra_spec.
@@ -5729,8 +5762,6 @@ class TestNewFlavor(unittest.TestCase):
         extra_specs = {"some-key": "some-value"}
         expected_extra_specs = {
             "hw:numa_nodes": "2",
-            "vmware:extra_config": '{"numa.nodeAffinity":"0"}',
-            "vmware:latency_sensitivity_level": "high",
             "hw:cpu_sockets": "2",
             "hw:cpu_threads": "8",
             "some-key": "some-value",
@@ -5747,6 +5778,9 @@ class TestNewFlavor(unittest.TestCase):
         _call_mock_process_numa_paired_threads = (
             mock_process_numa_paired_threads.call_args_list
         )
+        mock_process_vio_numa_nodes.assert_called_once_with(
+            2, {"some-key": "some-value", "hw:numa_nodes": "2"}
+        )
         self.assertEqual(
             _call_mock_process_numa_paired_threads[0].args,
             (
@@ -5755,8 +5789,6 @@ class TestNewFlavor(unittest.TestCase):
                     "hw:cpu_sockets": "2",
                     "hw:numa_nodes": "2",
                     "some-key": "some-value",
-                    "vmware:extra_config": '{"numa.nodeAffinity":"0"}',
-                    "vmware:latency_sensitivity_level": "high",
                 },
             ),
         )
@@ -5768,13 +5800,12 @@ class TestNewFlavor(unittest.TestCase):
                     "hw:cpu_sockets": "2",
                     "hw:numa_nodes": "2",
                     "some-key": "some-value",
-                    "vmware:extra_config": '{"numa.nodeAffinity":"0"}',
-                    "vmware:latency_sensitivity_level": "high",
                 },
             ),
         )
         self.assertDictEqual(extra_specs, expected_extra_specs)
 
+    @patch.object(vimconnector, "process_vio_numa_nodes", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_memory", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_vcpu", new_callable=CopyingMock())
     @patch.object(
@@ -5791,6 +5822,7 @@ class TestNewFlavor(unittest.TestCase):
         mock_process_numa_paired_threads,
         mock_process_numa_vcpu,
         mock_process_numa_memory,
+        mock_process_vio_numa_nodes,
     ):
         """Process numa parameters, id, cores exist, vim type is openstack.
         vcpus calculation according to cores in numa.
@@ -5824,6 +5856,7 @@ class TestNewFlavor(unittest.TestCase):
         )
         self.assertDictEqual(extra_specs, expected_extra_specs)
 
+    @patch.object(vimconnector, "process_vio_numa_nodes", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_memory", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_vcpu", new_callable=CopyingMock())
     @patch.object(
@@ -5840,6 +5873,7 @@ class TestNewFlavor(unittest.TestCase):
         mock_process_numa_paired_threads,
         mock_process_numa_vcpu,
         mock_process_numa_memory,
+        mock_process_vio_numa_nodes,
     ):
         """Process numa parameters, id, cores exist, vim type is VIO.
         vcpus calculation according to cores in numa.
@@ -5850,8 +5884,6 @@ class TestNewFlavor(unittest.TestCase):
             "hw:cpu_cores": "3",
             "hw:cpu_sockets": "2",
             "hw:numa_nodes": "2",
-            "vmware:extra_config": '{"numa.nodeAffinity":"0"}',
-            "vmware:latency_sensitivity_level": "high",
         }
         self.vimconn.vim_type = "VIO"
         mock_process_numa_cores.side_effect = [1, 2]
@@ -5862,6 +5894,7 @@ class TestNewFlavor(unittest.TestCase):
         self.assertEqual(mock_process_numa_memory.call_count, 2)
         self.assertEqual(mock_process_numa_vcpu.call_count, 2)
         self.assertEqual(mock_process_numa_cores.call_count, 2)
+        mock_process_vio_numa_nodes.assert_called_once_with(2, {"hw:numa_nodes": "2"})
         _call_mock_process_numa_cores = mock_process_numa_cores.call_args_list
         self.assertEqual(
             _call_mock_process_numa_cores[0].args,
@@ -5870,8 +5903,6 @@ class TestNewFlavor(unittest.TestCase):
                 {
                     "hw:cpu_sockets": "2",
                     "hw:numa_nodes": "2",
-                    "vmware:extra_config": '{"numa.nodeAffinity":"0"}',
-                    "vmware:latency_sensitivity_level": "high",
                 },
             ),
         )
@@ -5882,13 +5913,12 @@ class TestNewFlavor(unittest.TestCase):
                 {
                     "hw:cpu_sockets": "2",
                     "hw:numa_nodes": "2",
-                    "vmware:extra_config": '{"numa.nodeAffinity":"0"}',
-                    "vmware:latency_sensitivity_level": "high",
                 },
             ),
         )
         self.assertDictEqual(extra_specs, expected_extra_specs)
 
+    @patch.object(vimconnector, "process_vio_numa_nodes", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_memory", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_vcpu", new_callable=CopyingMock())
     @patch.object(
@@ -5905,6 +5935,7 @@ class TestNewFlavor(unittest.TestCase):
         mock_process_numa_paired_threads,
         mock_process_numa_vcpu,
         mock_process_numa_memory,
+        mock_process_vio_numa_nodes,
     ):
         """Process numa parameters, memory, vcpu, thread exist, vim type is VIO,
         vcpus calculation according threads in numa, there are not numa ids.
@@ -5916,8 +5947,6 @@ class TestNewFlavor(unittest.TestCase):
         extra_specs = {}
         expected_extra_specs = {
             "hw:numa_nodes": "2",
-            "vmware:extra_config": '{"numa.nodeAffinity":"0"}',
-            "vmware:latency_sensitivity_level": "high",
             "hw:cpu_sockets": "2",
             "hw:cpu_threads": "3",
         }
@@ -5932,6 +5961,7 @@ class TestNewFlavor(unittest.TestCase):
                 mock_process_numa_paired_threads,
             ]
         )
+        mock_process_vio_numa_nodes.assert_called_once_with(2, {"hw:numa_nodes": "2"})
         self.assertEqual(mock_process_numa_threads.call_count, 1)
         _call_mock_process_numa_threads = mock_process_numa_threads.call_args_list
         self.assertEqual(
@@ -5941,13 +5971,12 @@ class TestNewFlavor(unittest.TestCase):
                 {
                     "hw:cpu_sockets": "2",
                     "hw:numa_nodes": "2",
-                    "vmware:extra_config": '{"numa.nodeAffinity":"0"}',
-                    "vmware:latency_sensitivity_level": "high",
                 },
             ),
         )
         self.assertDictEqual(extra_specs, expected_extra_specs)
 
+    @patch.object(vimconnector, "process_vio_numa_nodes", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_memory", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_vcpu", new_callable=CopyingMock())
     @patch.object(
@@ -5964,6 +5993,7 @@ class TestNewFlavor(unittest.TestCase):
         mock_process_numa_paired_threads,
         mock_process_numa_vcpu,
         mock_process_numa_memory,
+        mock_process_vio_numa_nodes,
     ):
         """Process numa parameters, memory, vcpu, thread exist, vim type is openstack,
         vcpus calculation according threads in numa, there are not numa ids.
@@ -5988,6 +6018,7 @@ class TestNewFlavor(unittest.TestCase):
                 mock_process_numa_vcpu,
                 mock_process_numa_cores,
                 mock_process_numa_paired_threads,
+                mock_process_vio_numa_nodes,
             ]
         )
         self.assertEqual(mock_process_numa_threads.call_count, 1)
@@ -6001,6 +6032,7 @@ class TestNewFlavor(unittest.TestCase):
         )
         self.assertDictEqual(extra_specs, expected_extra_specs)
 
+    @patch.object(vimconnector, "process_vio_numa_nodes", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_memory", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_vcpu", new_callable=CopyingMock())
     @patch.object(
@@ -6017,15 +6049,12 @@ class TestNewFlavor(unittest.TestCase):
         mock_process_numa_paired_threads,
         mock_process_numa_vcpu,
         mock_process_numa_memory,
+        mock_process_vio_numa_nodes,
     ):
         """Numa list is empty, vim type is VIO."""
         numas = []
         extra_specs = {}
-        expected_extra_specs = {
-            "hw:numa_nodes": "0",
-            "vmware:extra_config": '{"numa.nodeAffinity":"0"}',
-            "vmware:latency_sensitivity_level": "high",
-        }
+        expected_extra_specs = {"hw:numa_nodes": "0"}
         self.vimconn.vim_type = "VIO"
         self.vimconn._process_numa_parameters_of_flavor(numas, extra_specs)
         self.check_if_assert_not_called(
@@ -6037,8 +6066,10 @@ class TestNewFlavor(unittest.TestCase):
                 mock_process_numa_threads,
             ]
         )
+        mock_process_vio_numa_nodes.assert_called_once_with(0, {"hw:numa_nodes": "0"})
         self.assertDictEqual(extra_specs, expected_extra_specs)
 
+    @patch.object(vimconnector, "process_vio_numa_nodes", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_memory", new_callable=CopyingMock())
     @patch.object(vimconnector, "process_numa_vcpu", new_callable=CopyingMock())
     @patch.object(
@@ -6055,6 +6086,7 @@ class TestNewFlavor(unittest.TestCase):
         mock_process_numa_paired_threads,
         mock_process_numa_vcpu,
         mock_process_numa_memory,
+        mock_process_vio_numa_nodes,
     ):
         """Numa list is empty, vim type is openstack."""
         numas = []
@@ -6071,6 +6103,7 @@ class TestNewFlavor(unittest.TestCase):
                 mock_process_numa_cores,
                 mock_process_numa_paired_threads,
                 mock_process_numa_threads,
+                mock_process_vio_numa_nodes,
             ]
         )
         self.assertDictEqual(extra_specs, expected_extra_specs)
@@ -7289,6 +7322,51 @@ class TestNewFlavor(unittest.TestCase):
         )
         self.assertEqual(mock_format_exception.call_count, 1)
 
+    def test_process_process_vio_numa_nodes_without_numa_with_extra_spec(self):
+        numa_nodes = 0
+        extra_specs = {"hw:numa_nodes": "0"}
+        expected_extra_spec = {
+            "vmware:latency_sensitivity_level": "high",
+            "hw:numa_nodes": "0",
+        }
+        self.vimconn.process_vio_numa_nodes(numa_nodes, extra_specs)
+        self.assertDictEqual(extra_specs, expected_extra_spec)
+
+    def test_process_process_vio_numa_nodes_list_type_numa_nodes_empty_extra_spec(self):
+        numa_nodes = [7, 9, 4]
+        extra_specs = {}
+        expected_extra_spec = {
+            "vmware:latency_sensitivity_level": "high",
+        }
+        self.vimconn.process_vio_numa_nodes(numa_nodes, extra_specs)
+        self.assertDictEqual(extra_specs, expected_extra_spec)
+
+    def test_process_process_vio_numa_nodes_with_numa_with_extra_spec(self):
+        numa_nodes = 5
+        extra_specs = {"hw:numa_nodes": "5"}
+        expected_extra_spec = {
+            "vmware:latency_sensitivity_level": "high",
+            "hw:numa_nodes": "5",
+        }
+        self.vimconn.process_vio_numa_nodes(numa_nodes, extra_specs)
+        self.assertDictEqual(extra_specs, expected_extra_spec)
+
+    def test_process_process_vio_numa_nodes_none_numa_nodes(self):
+        numa_nodes = None
+        extra_specs = {"hw:numa_nodes": "None"}
+        expected_extra_spec = {
+            "vmware:latency_sensitivity_level": "high",
+            "hw:numa_nodes": "None",
+        }
+        self.vimconn.process_vio_numa_nodes(numa_nodes, extra_specs)
+        self.assertDictEqual(extra_specs, expected_extra_spec)
+
+    def test_process_process_vio_numa_nodes_invalid_type_extra_specs(self):
+        numa_nodes = 5
+        extra_specs = []
+        with self.assertRaises(TypeError):
+            self.vimconn.process_vio_numa_nodes(numa_nodes, extra_specs)
+
 
 if __name__ == "__main__":
     unittest.main()