def test_split_dict_id(self): with self.assertRaises(TypeError): _parse_id(TestResourceGroupTransform.DICT_ID)
def test_split_non_resourcegroup_id(self): with self.assertRaises(KeyError): _parse_id(TestResourceGroupTransform.NON_RG_ID)
def test_split_bogus_resourcegroup_id(self): with self.assertRaises(IndexError): _parse_id(TestResourceGroupTransform.BOGUS_ID)
def test_split_correct_id(self): result = _parse_id(TestResourceGroupTransform.CORRECT_ID) self.assertDictEqual(result, { 'resource-group': 'REsourceGROUPname', 'name': 'vMName' })