コード例 #1
0
 def test_split_dict_id(self):
     with self.assertRaises(TypeError):
         _parse_id(TestResourceGroupTransform.DICT_ID)
コード例 #2
0
 def test_split_non_resourcegroup_id(self):
     with self.assertRaises(KeyError):
         _parse_id(TestResourceGroupTransform.NON_RG_ID)
コード例 #3
0
 def test_split_bogus_resourcegroup_id(self):
     with self.assertRaises(IndexError):
         _parse_id(TestResourceGroupTransform.BOGUS_ID)
コード例 #4
0
 def test_split_correct_id(self):
     result = _parse_id(TestResourceGroupTransform.CORRECT_ID)
     self.assertDictEqual(result, {
         'resource-group': 'REsourceGROUPname',
         'name': 'vMName'
     })
 def test_split_dict_id(self):
     with self.assertRaises(TypeError):
         _parse_id(TestResourceGroupTransform.DICT_ID)
 def test_split_bogus_resourcegroup_id(self):
     with self.assertRaises(IndexError):
         _parse_id(TestResourceGroupTransform.BOGUS_ID)
 def test_split_non_resourcegroup_id(self):
     with self.assertRaises(KeyError):
         _parse_id(TestResourceGroupTransform.NON_RG_ID)
 def test_split_correct_id(self):
     result = _parse_id(TestResourceGroupTransform.CORRECT_ID)
     self.assertDictEqual(result, {
         'resource-group': 'REsourceGROUPname',
         'name': 'vMName'
     })