summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSumit Naiksatam <sumitnaiksatam@gmail.com>2015-07-19 20:42:13 -0700
committerSumit Naiksatam <sumitnaiksatam@gmail.com>2015-07-19 21:15:03 -0700
commit61a2c9cfb0b184e0413c454c789aab221395b048 (patch)
treed118d9e5e543718c979c3ed6f2ccefe898512b92
parentf807d5b72b9f2a8b6c1d6290521ed3e7571d1f90 (diff)
Fix UTs due to change in Heat stack create
Notes
Notes (review): Verified+2: Jenkins Code-Review+2: Subrahmanyam Ongole <songole@oneconvergence.com> Workflow+1: Subrahmanyam Ongole <songole@oneconvergence.com> Code-Review+2: Hemanth Ravi <hemanth.ravi@oneconvergence.com> Code-Review+2: Magesh GV <mageshgv@gmail.com> Workflow+1: Magesh GV <mageshgv@gmail.com> Submitted-by: Jenkins Submitted-at: Mon, 20 Jul 2015 05:29:55 +0000 Reviewed-on: https://review.openstack.org/203478 Project: stackforge/group-based-policy-automation Branch: refs/heads/master
-rw-r--r--gbpautomation/heat/tests/test_grouppolicy.py266
-rw-r--r--gbpautomation/heat/tests/test_servicechain.py49
2 files changed, 175 insertions, 140 deletions
diff --git a/gbpautomation/heat/tests/test_grouppolicy.py b/gbpautomation/heat/tests/test_grouppolicy.py
index 7856312..a99e672 100644
--- a/gbpautomation/heat/tests/test_grouppolicy.py
+++ b/gbpautomation/heat/tests/test_grouppolicy.py
@@ -319,10 +319,10 @@ class PolicyTargetTest(HeatTestCase):
319 }).AndReturn({'policy_target': {'id': '5678'}}) 319 }).AndReturn({'policy_target': {'id': '5678'}})
320 320
321 snippet = template_format.parse(policy_target_template) 321 snippet = template_format.parse(policy_target_template)
322 stack = utils.parse_stack(snippet) 322 self.stack = utils.parse_stack(snippet)
323 resource_defns = stack.t.resource_definitions(stack) 323 resource_defns = self.stack.t.resource_definitions(self.stack)
324 return grouppolicy.PolicyTarget( 324 return grouppolicy.PolicyTarget(
325 'policy_target', resource_defns['policy_target'], stack) 325 'policy_target', resource_defns['policy_target'], self.stack)
326 326
327 def test_create(self): 327 def test_create(self):
328 rsrc = self.create_policy_target() 328 rsrc = self.create_policy_target()
@@ -342,16 +342,17 @@ class PolicyTargetTest(HeatTestCase):
342 self.m.ReplayAll() 342 self.m.ReplayAll()
343 343
344 snippet = template_format.parse(policy_target_template) 344 snippet = template_format.parse(policy_target_template)
345 stack = utils.parse_stack(snippet) 345 self.stack = utils.parse_stack(snippet)
346 resource_defns = stack.t.resource_definitions(stack) 346 resource_defns = self.stack.t.resource_definitions(self.stack)
347 rsrc = grouppolicy.PolicyTarget( 347 rsrc = grouppolicy.PolicyTarget(
348 'policy_target', resource_defns['policy_target'], stack) 348 'policy_target', resource_defns['policy_target'], self.stack)
349 349
350 error = self.assertRaises(exception.ResourceFailure, 350 error = self.assertRaises(exception.ResourceFailure,
351 scheduler.TaskRunner(rsrc.create)) 351 scheduler.TaskRunner(rsrc.create))
352 self.assertEqual( 352 self.assertEqual(
353 'NeutronClientException: An unknown exception occurred.', 353 'NeutronClientException: resources.policy_target: '
354 str(error)) 354 'An unknown exception occurred.',
355 six.text_type(error))
355 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state) 356 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state)
356 self.m.VerifyAll() 357 self.m.VerifyAll()
357 358
@@ -388,7 +389,8 @@ class PolicyTargetTest(HeatTestCase):
388 error = self.assertRaises(exception.ResourceFailure, 389 error = self.assertRaises(exception.ResourceFailure,
389 scheduler.TaskRunner(rsrc.delete)) 390 scheduler.TaskRunner(rsrc.delete))
390 self.assertEqual( 391 self.assertEqual(
391 'NeutronClientException: An unknown exception occurred.', 392 'NeutronClientException: resources.policy_target: '
393 'An unknown exception occurred.',
392 six.text_type(error)) 394 six.text_type(error))
393 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state) 395 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state)
394 self.m.VerifyAll() 396 self.m.VerifyAll()
@@ -411,7 +413,7 @@ class PolicyTargetTest(HeatTestCase):
411 rsrc.FnGetAtt, 'l2_policy_id') 413 rsrc.FnGetAtt, 'l2_policy_id')
412 self.assertEqual( 414 self.assertEqual(
413 'The Referenced Attribute (policy_target l2_policy_id) is ' 415 'The Referenced Attribute (policy_target l2_policy_id) is '
414 'incorrect.', str(error)) 416 'incorrect.', six.text_type(error))
415 self.m.VerifyAll() 417 self.m.VerifyAll()
416 418
417 def test_update(self): 419 def test_update(self):
@@ -459,11 +461,11 @@ class PolicyTargetGroupTest(HeatTestCase):
459 }).AndReturn({'policy_target_group': {'id': '5678'}}) 461 }).AndReturn({'policy_target_group': {'id': '5678'}})
460 462
461 snippet = template_format.parse(policy_target_group_template) 463 snippet = template_format.parse(policy_target_group_template)
462 stack = utils.parse_stack(snippet) 464 self.stack = utils.parse_stack(snippet)
463 resource_defns = stack.t.resource_definitions(stack) 465 resource_defns = self.stack.t.resource_definitions(self.stack)
464 return grouppolicy.PolicyTargetGroup( 466 return grouppolicy.PolicyTargetGroup(
465 'policy_target_group', resource_defns['policy_target_group'], 467 'policy_target_group', resource_defns['policy_target_group'],
466 stack) 468 self.stack)
467 469
468 def test_create(self): 470 def test_create(self):
469 rsrc = self.create_policy_target_group() 471 rsrc = self.create_policy_target_group()
@@ -492,17 +494,18 @@ class PolicyTargetGroupTest(HeatTestCase):
492 self.m.ReplayAll() 494 self.m.ReplayAll()
493 495
494 snippet = template_format.parse(policy_target_group_template) 496 snippet = template_format.parse(policy_target_group_template)
495 stack = utils.parse_stack(snippet) 497 self.stack = utils.parse_stack(snippet)
496 resource_defns = stack.t.resource_definitions(stack) 498 resource_defns = self.stack.t.resource_definitions(self.stack)
497 rsrc = grouppolicy.PolicyTargetGroup( 499 rsrc = grouppolicy.PolicyTargetGroup(
498 'policy_target_group', resource_defns['policy_target_group'], 500 'policy_target_group', resource_defns['policy_target_group'],
499 stack) 501 self.stack)
500 502
501 error = self.assertRaises(exception.ResourceFailure, 503 error = self.assertRaises(exception.ResourceFailure,
502 scheduler.TaskRunner(rsrc.create)) 504 scheduler.TaskRunner(rsrc.create))
503 self.assertEqual( 505 self.assertEqual(
504 'NeutronClientException: An unknown exception occurred.', 506 'NeutronClientException: resources.policy_target_group: '
505 str(error)) 507 'An unknown exception occurred.',
508 six.text_type(error))
506 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state) 509 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state)
507 self.m.VerifyAll() 510 self.m.VerifyAll()
508 511
@@ -539,8 +542,9 @@ class PolicyTargetGroupTest(HeatTestCase):
539 error = self.assertRaises(exception.ResourceFailure, 542 error = self.assertRaises(exception.ResourceFailure,
540 scheduler.TaskRunner(rsrc.delete)) 543 scheduler.TaskRunner(rsrc.delete))
541 self.assertEqual( 544 self.assertEqual(
542 'NeutronClientException: An unknown exception occurred.', 545 'NeutronClientException: resources.policy_target_group: '
543 str(error)) 546 'An unknown exception occurred.',
547 six.text_type(error))
544 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state) 548 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state)
545 self.m.VerifyAll() 549 self.m.VerifyAll()
546 550
@@ -607,10 +611,10 @@ class L2PolicyTest(HeatTestCase):
607 }).AndReturn({'l2_policy': {'id': '5678'}}) 611 }).AndReturn({'l2_policy': {'id': '5678'}})
608 612
609 snippet = template_format.parse(l2_policy_template) 613 snippet = template_format.parse(l2_policy_template)
610 stack = utils.parse_stack(snippet) 614 self.stack = utils.parse_stack(snippet)
611 resource_defns = stack.t.resource_definitions(stack) 615 resource_defns = self.stack.t.resource_definitions(self.stack)
612 return grouppolicy.L2Policy( 616 return grouppolicy.L2Policy(
613 'l2_policy', resource_defns['l2_policy'], stack) 617 'l2_policy', resource_defns['l2_policy'], self.stack)
614 618
615 def test_create(self): 619 def test_create(self):
616 rsrc = self.create_l2_policy() 620 rsrc = self.create_l2_policy()
@@ -631,16 +635,17 @@ class L2PolicyTest(HeatTestCase):
631 self.m.ReplayAll() 635 self.m.ReplayAll()
632 636
633 snippet = template_format.parse(l2_policy_template) 637 snippet = template_format.parse(l2_policy_template)
634 stack = utils.parse_stack(snippet) 638 self.stack = utils.parse_stack(snippet)
635 resource_defns = stack.t.resource_definitions(stack) 639 resource_defns = self.stack.t.resource_definitions(self.stack)
636 rsrc = grouppolicy.L2Policy( 640 rsrc = grouppolicy.L2Policy(
637 'l2_policy', resource_defns['l2_policy'], stack) 641 'l2_policy', resource_defns['l2_policy'], self.stack)
638 642
639 error = self.assertRaises(exception.ResourceFailure, 643 error = self.assertRaises(exception.ResourceFailure,
640 scheduler.TaskRunner(rsrc.create)) 644 scheduler.TaskRunner(rsrc.create))
641 self.assertEqual( 645 self.assertEqual(
642 'NeutronClientException: An unknown exception occurred.', 646 'NeutronClientException: resources.l2_policy: '
643 str(error)) 647 'An unknown exception occurred.',
648 six.text_type(error))
644 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state) 649 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state)
645 self.m.VerifyAll() 650 self.m.VerifyAll()
646 651
@@ -677,8 +682,9 @@ class L2PolicyTest(HeatTestCase):
677 error = self.assertRaises(exception.ResourceFailure, 682 error = self.assertRaises(exception.ResourceFailure,
678 scheduler.TaskRunner(rsrc.delete)) 683 scheduler.TaskRunner(rsrc.delete))
679 self.assertEqual( 684 self.assertEqual(
680 'NeutronClientException: An unknown exception occurred.', 685 'NeutronClientException: resources.l2_policy: '
681 str(error)) 686 'An unknown exception occurred.',
687 six.text_type(error))
682 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state) 688 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state)
683 self.m.VerifyAll() 689 self.m.VerifyAll()
684 690
@@ -719,10 +725,10 @@ class L3PolicyTest(HeatTestCase):
719 }).AndReturn({'l3_policy': {'id': '5678'}}) 725 }).AndReturn({'l3_policy': {'id': '5678'}})
720 726
721 snippet = template_format.parse(l3_policy_template) 727 snippet = template_format.parse(l3_policy_template)
722 stack = utils.parse_stack(snippet) 728 self.stack = utils.parse_stack(snippet)
723 resource_defns = stack.t.resource_definitions(stack) 729 resource_defns = self.stack.t.resource_definitions(self.stack)
724 return grouppolicy.L3Policy( 730 return grouppolicy.L3Policy(
725 'l3_policy', resource_defns['l3_policy'], stack) 731 'l3_policy', resource_defns['l3_policy'], self.stack)
726 732
727 def test_create(self): 733 def test_create(self):
728 rsrc = self.create_l3_policy() 734 rsrc = self.create_l3_policy()
@@ -745,16 +751,17 @@ class L3PolicyTest(HeatTestCase):
745 self.m.ReplayAll() 751 self.m.ReplayAll()
746 752
747 snippet = template_format.parse(l3_policy_template) 753 snippet = template_format.parse(l3_policy_template)
748 stack = utils.parse_stack(snippet) 754 self.stack = utils.parse_stack(snippet)
749 resource_defns = stack.t.resource_definitions(stack) 755 resource_defns = self.stack.t.resource_definitions(self.stack)
750 rsrc = grouppolicy.L3Policy( 756 rsrc = grouppolicy.L3Policy(
751 'l3_policy', resource_defns['l3_policy'], stack) 757 'l3_policy', resource_defns['l3_policy'], self.stack)
752 758
753 error = self.assertRaises(exception.ResourceFailure, 759 error = self.assertRaises(exception.ResourceFailure,
754 scheduler.TaskRunner(rsrc.create)) 760 scheduler.TaskRunner(rsrc.create))
755 self.assertEqual( 761 self.assertEqual(
756 'NeutronClientException: An unknown exception occurred.', 762 'NeutronClientException: resources.l3_policy: '
757 str(error)) 763 'An unknown exception occurred.',
764 six.text_type(error))
758 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state) 765 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state)
759 self.m.VerifyAll() 766 self.m.VerifyAll()
760 767
@@ -791,8 +798,9 @@ class L3PolicyTest(HeatTestCase):
791 error = self.assertRaises(exception.ResourceFailure, 798 error = self.assertRaises(exception.ResourceFailure,
792 scheduler.TaskRunner(rsrc.delete)) 799 scheduler.TaskRunner(rsrc.delete))
793 self.assertEqual( 800 self.assertEqual(
794 'NeutronClientException: An unknown exception occurred.', 801 'NeutronClientException: resources.l3_policy: '
795 str(error)) 802 'An unknown exception occurred.',
803 six.text_type(error))
796 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state) 804 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state)
797 self.m.VerifyAll() 805 self.m.VerifyAll()
798 806
@@ -837,10 +845,11 @@ class PolicyClassifierTest(HeatTestCase):
837 }).AndReturn({'policy_classifier': {'id': '5678'}}) 845 }).AndReturn({'policy_classifier': {'id': '5678'}})
838 846
839 snippet = template_format.parse(policy_classifier_template) 847 snippet = template_format.parse(policy_classifier_template)
840 stack = utils.parse_stack(snippet) 848 self.stack = utils.parse_stack(snippet)
841 resource_defns = stack.t.resource_definitions(stack) 849 resource_defns = self.stack.t.resource_definitions(self.stack)
842 return grouppolicy.PolicyClassifier( 850 return grouppolicy.PolicyClassifier(
843 'policy_classifier', resource_defns['policy_classifier'], stack) 851 'policy_classifier', resource_defns['policy_classifier'],
852 self.stack)
844 853
845 def test_create(self): 854 def test_create(self):
846 rsrc = self.create_policy_classifier() 855 rsrc = self.create_policy_classifier()
@@ -863,16 +872,18 @@ class PolicyClassifierTest(HeatTestCase):
863 self.m.ReplayAll() 872 self.m.ReplayAll()
864 873
865 snippet = template_format.parse(policy_classifier_template) 874 snippet = template_format.parse(policy_classifier_template)
866 stack = utils.parse_stack(snippet) 875 self.stack = utils.parse_stack(snippet)
867 resource_defns = stack.t.resource_definitions(stack) 876 resource_defns = self.stack.t.resource_definitions(self.stack)
868 rsrc = grouppolicy.PolicyClassifier( 877 rsrc = grouppolicy.PolicyClassifier(
869 'policy_classifier', resource_defns['policy_classifier'], stack) 878 'policy_classifier', resource_defns['policy_classifier'],
879 self.stack)
870 880
871 error = self.assertRaises(exception.ResourceFailure, 881 error = self.assertRaises(exception.ResourceFailure,
872 scheduler.TaskRunner(rsrc.create)) 882 scheduler.TaskRunner(rsrc.create))
873 self.assertEqual( 883 self.assertEqual(
874 'NeutronClientException: An unknown exception occurred.', 884 'NeutronClientException: resources.policy_classifier: '
875 str(error)) 885 'An unknown exception occurred.',
886 six.text_type(error))
876 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state) 887 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state)
877 self.m.VerifyAll() 888 self.m.VerifyAll()
878 889
@@ -909,8 +920,9 @@ class PolicyClassifierTest(HeatTestCase):
909 error = self.assertRaises(exception.ResourceFailure, 920 error = self.assertRaises(exception.ResourceFailure,
910 scheduler.TaskRunner(rsrc.delete)) 921 scheduler.TaskRunner(rsrc.delete))
911 self.assertEqual( 922 self.assertEqual(
912 'NeutronClientException: An unknown exception occurred.', 923 'NeutronClientException: resources.policy_classifier: '
913 str(error)) 924 'An unknown exception occurred.',
925 six.text_type(error))
914 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state) 926 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state)
915 self.m.VerifyAll() 927 self.m.VerifyAll()
916 928
@@ -950,10 +962,10 @@ class PolicyActionTest(HeatTestCase):
950 }).AndReturn({'policy_action': {'id': '5678'}}) 962 }).AndReturn({'policy_action': {'id': '5678'}})
951 963
952 snippet = template_format.parse(policy_action_template) 964 snippet = template_format.parse(policy_action_template)
953 stack = utils.parse_stack(snippet) 965 self.stack = utils.parse_stack(snippet)
954 resource_defns = stack.t.resource_definitions(stack) 966 resource_defns = self.stack.t.resource_definitions(self.stack)
955 return grouppolicy.PolicyAction( 967 return grouppolicy.PolicyAction(
956 'policy_action', resource_defns['policy_action'], stack) 968 'policy_action', resource_defns['policy_action'], self.stack)
957 969
958 def test_create(self): 970 def test_create(self):
959 rsrc = self.create_policy_action() 971 rsrc = self.create_policy_action()
@@ -975,16 +987,17 @@ class PolicyActionTest(HeatTestCase):
975 self.m.ReplayAll() 987 self.m.ReplayAll()
976 988
977 snippet = template_format.parse(policy_action_template) 989 snippet = template_format.parse(policy_action_template)
978 stack = utils.parse_stack(snippet) 990 self.stack = utils.parse_stack(snippet)
979 resource_defns = stack.t.resource_definitions(stack) 991 resource_defns = self.stack.t.resource_definitions(self.stack)
980 rsrc = grouppolicy.PolicyAction( 992 rsrc = grouppolicy.PolicyAction(
981 'policy_action', resource_defns['policy_action'], stack) 993 'policy_action', resource_defns['policy_action'], self.stack)
982 994
983 error = self.assertRaises(exception.ResourceFailure, 995 error = self.assertRaises(exception.ResourceFailure,
984 scheduler.TaskRunner(rsrc.create)) 996 scheduler.TaskRunner(rsrc.create))
985 self.assertEqual( 997 self.assertEqual(
986 'NeutronClientException: An unknown exception occurred.', 998 'NeutronClientException: resources.policy_action: '
987 str(error)) 999 'An unknown exception occurred.',
1000 six.text_type(error))
988 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state) 1001 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state)
989 self.m.VerifyAll() 1002 self.m.VerifyAll()
990 1003
@@ -1021,8 +1034,9 @@ class PolicyActionTest(HeatTestCase):
1021 error = self.assertRaises(exception.ResourceFailure, 1034 error = self.assertRaises(exception.ResourceFailure,
1022 scheduler.TaskRunner(rsrc.delete)) 1035 scheduler.TaskRunner(rsrc.delete))
1023 self.assertEqual( 1036 self.assertEqual(
1024 'NeutronClientException: An unknown exception occurred.', 1037 'NeutronClientException: resources.policy_action: '
1025 str(error)) 1038 'An unknown exception occurred.',
1039 six.text_type(error))
1026 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state) 1040 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state)
1027 self.m.VerifyAll() 1041 self.m.VerifyAll()
1028 1042
@@ -1063,10 +1077,10 @@ class PolicyRuleTest(HeatTestCase):
1063 }).AndReturn({'policy_rule': {'id': '5678'}}) 1077 }).AndReturn({'policy_rule': {'id': '5678'}})
1064 1078
1065 snippet = template_format.parse(policy_rule_template) 1079 snippet = template_format.parse(policy_rule_template)
1066 stack = utils.parse_stack(snippet) 1080 self.stack = utils.parse_stack(snippet)
1067 resource_defns = stack.t.resource_definitions(stack) 1081 resource_defns = self.stack.t.resource_definitions(self.stack)
1068 return grouppolicy.PolicyRule( 1082 return grouppolicy.PolicyRule(
1069 'policy_rule', resource_defns['policy_rule'], stack) 1083 'policy_rule', resource_defns['policy_rule'], self.stack)
1070 1084
1071 def test_create(self): 1085 def test_create(self):
1072 rsrc = self.create_policy_rule() 1086 rsrc = self.create_policy_rule()
@@ -1089,16 +1103,17 @@ class PolicyRuleTest(HeatTestCase):
1089 self.m.ReplayAll() 1103 self.m.ReplayAll()
1090 1104
1091 snippet = template_format.parse(policy_rule_template) 1105 snippet = template_format.parse(policy_rule_template)
1092 stack = utils.parse_stack(snippet) 1106 self.stack = utils.parse_stack(snippet)
1093 resource_defns = stack.t.resource_definitions(stack) 1107 resource_defns = self.stack.t.resource_definitions(self.stack)
1094 rsrc = grouppolicy.PolicyRule( 1108 rsrc = grouppolicy.PolicyRule(
1095 'policy_rule', resource_defns['policy_rule'], stack) 1109 'policy_rule', resource_defns['policy_rule'], self.stack)
1096 1110
1097 error = self.assertRaises(exception.ResourceFailure, 1111 error = self.assertRaises(exception.ResourceFailure,
1098 scheduler.TaskRunner(rsrc.create)) 1112 scheduler.TaskRunner(rsrc.create))
1099 self.assertEqual( 1113 self.assertEqual(
1100 'NeutronClientException: An unknown exception occurred.', 1114 'NeutronClientException: resources.policy_rule: '
1101 str(error)) 1115 'An unknown exception occurred.',
1116 six.text_type(error))
1102 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state) 1117 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state)
1103 self.m.VerifyAll() 1118 self.m.VerifyAll()
1104 1119
@@ -1135,8 +1150,9 @@ class PolicyRuleTest(HeatTestCase):
1135 error = self.assertRaises(exception.ResourceFailure, 1150 error = self.assertRaises(exception.ResourceFailure,
1136 scheduler.TaskRunner(rsrc.delete)) 1151 scheduler.TaskRunner(rsrc.delete))
1137 self.assertEqual( 1152 self.assertEqual(
1138 'NeutronClientException: An unknown exception occurred.', 1153 'NeutronClientException: resources.policy_rule: '
1139 str(error)) 1154 'An unknown exception occurred.',
1155 six.text_type(error))
1140 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state) 1156 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state)
1141 self.m.VerifyAll() 1157 self.m.VerifyAll()
1142 1158
@@ -1177,10 +1193,10 @@ class PolicyRuleSetTest(HeatTestCase):
1177 }).AndReturn({'policy_rule_set': {'id': '5678'}}) 1193 }).AndReturn({'policy_rule_set': {'id': '5678'}})
1178 1194
1179 snippet = template_format.parse(policy_rule_set_template) 1195 snippet = template_format.parse(policy_rule_set_template)
1180 stack = utils.parse_stack(snippet) 1196 self.stack = utils.parse_stack(snippet)
1181 resource_defns = stack.t.resource_definitions(stack) 1197 resource_defns = self.stack.t.resource_definitions(self.stack)
1182 return grouppolicy.PolicyRuleSet( 1198 return grouppolicy.PolicyRuleSet(
1183 'policy_rule_set', resource_defns['policy_rule_set'], stack) 1199 'policy_rule_set', resource_defns['policy_rule_set'], self.stack)
1184 1200
1185 def test_create(self): 1201 def test_create(self):
1186 rsrc = self.create_policy_rule_set() 1202 rsrc = self.create_policy_rule_set()
@@ -1203,16 +1219,17 @@ class PolicyRuleSetTest(HeatTestCase):
1203 self.m.ReplayAll() 1219 self.m.ReplayAll()
1204 1220
1205 snippet = template_format.parse(policy_rule_set_template) 1221 snippet = template_format.parse(policy_rule_set_template)
1206 stack = utils.parse_stack(snippet) 1222 self.stack = utils.parse_stack(snippet)
1207 resource_defns = stack.t.resource_definitions(stack) 1223 resource_defns = self.stack.t.resource_definitions(self.stack)
1208 rsrc = grouppolicy.PolicyRuleSet( 1224 rsrc = grouppolicy.PolicyRuleSet(
1209 'policy_rule_set', resource_defns['policy_rule_set'], stack) 1225 'policy_rule_set', resource_defns['policy_rule_set'], self.stack)
1210 1226
1211 error = self.assertRaises(exception.ResourceFailure, 1227 error = self.assertRaises(exception.ResourceFailure,
1212 scheduler.TaskRunner(rsrc.create)) 1228 scheduler.TaskRunner(rsrc.create))
1213 self.assertEqual( 1229 self.assertEqual(
1214 'NeutronClientException: An unknown exception occurred.', 1230 'NeutronClientException: resources.policy_rule_set: '
1215 str(error)) 1231 'An unknown exception occurred.',
1232 six.text_type(error))
1216 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state) 1233 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state)
1217 self.m.VerifyAll() 1234 self.m.VerifyAll()
1218 1235
@@ -1249,8 +1266,9 @@ class PolicyRuleSetTest(HeatTestCase):
1249 error = self.assertRaises(exception.ResourceFailure, 1266 error = self.assertRaises(exception.ResourceFailure,
1250 scheduler.TaskRunner(rsrc.delete)) 1267 scheduler.TaskRunner(rsrc.delete))
1251 self.assertEqual( 1268 self.assertEqual(
1252 'NeutronClientException: An unknown exception occurred.', 1269 'NeutronClientException: resources.policy_rule_set: '
1253 str(error)) 1270 'An unknown exception occurred.',
1271 six.text_type(error))
1254 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state) 1272 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state)
1255 self.m.VerifyAll() 1273 self.m.VerifyAll()
1256 1274
@@ -1295,11 +1313,11 @@ class NetworkServicePolicyTest(HeatTestCase):
1295 }).AndReturn({'network_service_policy': {'id': '5678'}}) 1313 }).AndReturn({'network_service_policy': {'id': '5678'}})
1296 1314
1297 snippet = template_format.parse(network_service_policy_template) 1315 snippet = template_format.parse(network_service_policy_template)
1298 stack = utils.parse_stack(snippet) 1316 self.stack = utils.parse_stack(snippet)
1299 resource_defns = stack.t.resource_definitions(stack) 1317 resource_defns = self.stack.t.resource_definitions(self.stack)
1300 return grouppolicy.NetworkServicePolicy( 1318 return grouppolicy.NetworkServicePolicy(
1301 'network_service_policy', 1319 'network_service_policy',
1302 resource_defns['network_service_policy'], stack) 1320 resource_defns['network_service_policy'], self.stack)
1303 1321
1304 def test_create(self): 1322 def test_create(self):
1305 rsrc = self.create_network_service_policy() 1323 rsrc = self.create_network_service_policy()
@@ -1322,17 +1340,18 @@ class NetworkServicePolicyTest(HeatTestCase):
1322 self.m.ReplayAll() 1340 self.m.ReplayAll()
1323 1341
1324 snippet = template_format.parse(network_service_policy_template) 1342 snippet = template_format.parse(network_service_policy_template)
1325 stack = utils.parse_stack(snippet) 1343 self.stack = utils.parse_stack(snippet)
1326 resource_defns = stack.t.resource_definitions(stack) 1344 resource_defns = self.stack.t.resource_definitions(self.stack)
1327 rsrc = grouppolicy.NetworkServicePolicy( 1345 rsrc = grouppolicy.NetworkServicePolicy(
1328 'network_service_policy', 1346 'network_service_policy',
1329 resource_defns['network_service_policy'], stack) 1347 resource_defns['network_service_policy'], self.stack)
1330 1348
1331 error = self.assertRaises(exception.ResourceFailure, 1349 error = self.assertRaises(exception.ResourceFailure,
1332 scheduler.TaskRunner(rsrc.create)) 1350 scheduler.TaskRunner(rsrc.create))
1333 self.assertEqual( 1351 self.assertEqual(
1334 'NeutronClientException: An unknown exception occurred.', 1352 'NeutronClientException: resources.network_service_policy: '
1335 str(error)) 1353 'An unknown exception occurred.',
1354 six.text_type(error))
1336 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state) 1355 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state)
1337 self.m.VerifyAll() 1356 self.m.VerifyAll()
1338 1357
@@ -1369,8 +1388,9 @@ class NetworkServicePolicyTest(HeatTestCase):
1369 error = self.assertRaises(exception.ResourceFailure, 1388 error = self.assertRaises(exception.ResourceFailure,
1370 scheduler.TaskRunner(rsrc.delete)) 1389 scheduler.TaskRunner(rsrc.delete))
1371 self.assertEqual( 1390 self.assertEqual(
1372 'NeutronClientException: An unknown exception occurred.', 1391 'NeutronClientException: resources.network_service_policy: '
1373 str(error)) 1392 'An unknown exception occurred.',
1393 six.text_type(error))
1374 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state) 1394 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state)
1375 self.m.VerifyAll() 1395 self.m.VerifyAll()
1376 1396
@@ -1423,11 +1443,11 @@ class ExternalPolicyTest(HeatTestCase):
1423 }).AndReturn({'external_policy': {'id': '5678'}}) 1443 }).AndReturn({'external_policy': {'id': '5678'}})
1424 1444
1425 snippet = template_format.parse(external_policy_template) 1445 snippet = template_format.parse(external_policy_template)
1426 stack = utils.parse_stack(snippet) 1446 self.stack = utils.parse_stack(snippet)
1427 resource_defns = stack.t.resource_definitions(stack) 1447 resource_defns = self.stack.t.resource_definitions(self.stack)
1428 return grouppolicy.ExternalPolicy( 1448 return grouppolicy.ExternalPolicy(
1429 'external_policy', 1449 'external_policy',
1430 resource_defns['external_policy'], stack) 1450 resource_defns['external_policy'], self.stack)
1431 1451
1432 def test_create(self): 1452 def test_create(self):
1433 rsrc = self.create_external_policy() 1453 rsrc = self.create_external_policy()
@@ -1456,17 +1476,18 @@ class ExternalPolicyTest(HeatTestCase):
1456 self.m.ReplayAll() 1476 self.m.ReplayAll()
1457 1477
1458 snippet = template_format.parse(external_policy_template) 1478 snippet = template_format.parse(external_policy_template)
1459 stack = utils.parse_stack(snippet) 1479 self.stack = utils.parse_stack(snippet)
1460 resource_defns = stack.t.resource_definitions(stack) 1480 resource_defns = self.stack.t.resource_definitions(self.stack)
1461 rsrc = grouppolicy.ExternalPolicy( 1481 rsrc = grouppolicy.ExternalPolicy(
1462 'external_policy', 1482 'external_policy',
1463 resource_defns['external_policy'], stack) 1483 resource_defns['external_policy'], self.stack)
1464 1484
1465 error = self.assertRaises(exception.ResourceFailure, 1485 error = self.assertRaises(exception.ResourceFailure,
1466 scheduler.TaskRunner(rsrc.create)) 1486 scheduler.TaskRunner(rsrc.create))
1467 self.assertEqual( 1487 self.assertEqual(
1468 'NeutronClientException: An unknown exception occurred.', 1488 'NeutronClientException: resources.external_policy: '
1469 str(error)) 1489 'An unknown exception occurred.',
1490 six.text_type(error))
1470 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state) 1491 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state)
1471 self.m.VerifyAll() 1492 self.m.VerifyAll()
1472 1493
@@ -1503,8 +1524,9 @@ class ExternalPolicyTest(HeatTestCase):
1503 error = self.assertRaises(exception.ResourceFailure, 1524 error = self.assertRaises(exception.ResourceFailure,
1504 scheduler.TaskRunner(rsrc.delete)) 1525 scheduler.TaskRunner(rsrc.delete))
1505 self.assertEqual( 1526 self.assertEqual(
1506 'NeutronClientException: An unknown exception occurred.', 1527 'NeutronClientException: resources.external_policy: '
1507 str(error)) 1528 'An unknown exception occurred.',
1529 six.text_type(error))
1508 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state) 1530 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state)
1509 self.m.VerifyAll() 1531 self.m.VerifyAll()
1510 1532
@@ -1582,11 +1604,11 @@ class ExternalSegmentTest(HeatTestCase):
1582 }).AndReturn({'external_segment': {'id': '5678'}}) 1604 }).AndReturn({'external_segment': {'id': '5678'}})
1583 1605
1584 snippet = template_format.parse(external_segment_template) 1606 snippet = template_format.parse(external_segment_template)
1585 stack = utils.parse_stack(snippet) 1607 self.stack = utils.parse_stack(snippet)
1586 resource_defns = stack.t.resource_definitions(stack) 1608 resource_defns = self.stack.t.resource_definitions(self.stack)
1587 return grouppolicy.ExternalSegment( 1609 return grouppolicy.ExternalSegment(
1588 'external_segment', 1610 'external_segment',
1589 resource_defns['external_segment'], stack) 1611 resource_defns['external_segment'], self.stack)
1590 1612
1591 def test_create(self): 1613 def test_create(self):
1592 rsrc = self.create_external_segment() 1614 rsrc = self.create_external_segment()
@@ -1614,17 +1636,18 @@ class ExternalSegmentTest(HeatTestCase):
1614 self.m.ReplayAll() 1636 self.m.ReplayAll()
1615 1637
1616 snippet = template_format.parse(external_segment_template) 1638 snippet = template_format.parse(external_segment_template)
1617 stack = utils.parse_stack(snippet) 1639 self.stack = utils.parse_stack(snippet)
1618 resource_defns = stack.t.resource_definitions(stack) 1640 resource_defns = self.stack.t.resource_definitions(self.stack)
1619 rsrc = grouppolicy.ExternalSegment( 1641 rsrc = grouppolicy.ExternalSegment(
1620 'external_segment', 1642 'external_segment',
1621 resource_defns['external_segment'], stack) 1643 resource_defns['external_segment'], self.stack)
1622 1644
1623 error = self.assertRaises(exception.ResourceFailure, 1645 error = self.assertRaises(exception.ResourceFailure,
1624 scheduler.TaskRunner(rsrc.create)) 1646 scheduler.TaskRunner(rsrc.create))
1625 self.assertEqual( 1647 self.assertEqual(
1626 'NeutronClientException: An unknown exception occurred.', 1648 'NeutronClientException: resources.external_segment: '
1627 str(error)) 1649 'An unknown exception occurred.',
1650 six.text_type(error))
1628 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state) 1651 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state)
1629 self.m.VerifyAll() 1652 self.m.VerifyAll()
1630 1653
@@ -1661,8 +1684,9 @@ class ExternalSegmentTest(HeatTestCase):
1661 error = self.assertRaises(exception.ResourceFailure, 1684 error = self.assertRaises(exception.ResourceFailure,
1662 scheduler.TaskRunner(rsrc.delete)) 1685 scheduler.TaskRunner(rsrc.delete))
1663 self.assertEqual( 1686 self.assertEqual(
1664 'NeutronClientException: An unknown exception occurred.', 1687 'NeutronClientException: resources.external_segment: '
1665 str(error)) 1688 'An unknown exception occurred.',
1689 six.text_type(error))
1666 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state) 1690 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state)
1667 self.m.VerifyAll() 1691 self.m.VerifyAll()
1668 1692
@@ -1708,11 +1732,11 @@ class NATPoolTest(HeatTestCase):
1708 }).AndReturn({'nat_pool': {'id': '5678'}}) 1732 }).AndReturn({'nat_pool': {'id': '5678'}})
1709 1733
1710 snippet = template_format.parse(nat_pool_template) 1734 snippet = template_format.parse(nat_pool_template)
1711 stack = utils.parse_stack(snippet) 1735 self.stack = utils.parse_stack(snippet)
1712 resource_defns = stack.t.resource_definitions(stack) 1736 resource_defns = self.stack.t.resource_definitions(self.stack)
1713 return grouppolicy.NATPool( 1737 return grouppolicy.NATPool(
1714 'nat_pool', 1738 'nat_pool',
1715 resource_defns['nat_pool'], stack) 1739 resource_defns['nat_pool'], self.stack)
1716 1740
1717 def test_create(self): 1741 def test_create(self):
1718 rsrc = self.create_nat_pool() 1742 rsrc = self.create_nat_pool()
@@ -1735,17 +1759,18 @@ class NATPoolTest(HeatTestCase):
1735 self.m.ReplayAll() 1759 self.m.ReplayAll()
1736 1760
1737 snippet = template_format.parse(nat_pool_template) 1761 snippet = template_format.parse(nat_pool_template)
1738 stack = utils.parse_stack(snippet) 1762 self.stack = utils.parse_stack(snippet)
1739 resource_defns = stack.t.resource_definitions(stack) 1763 resource_defns = self.stack.t.resource_definitions(self.stack)
1740 rsrc = grouppolicy.NATPool( 1764 rsrc = grouppolicy.NATPool(
1741 'nat_pool', 1765 'nat_pool',
1742 resource_defns['nat_pool'], stack) 1766 resource_defns['nat_pool'], self.stack)
1743 1767
1744 error = self.assertRaises(exception.ResourceFailure, 1768 error = self.assertRaises(exception.ResourceFailure,
1745 scheduler.TaskRunner(rsrc.create)) 1769 scheduler.TaskRunner(rsrc.create))
1746 self.assertEqual( 1770 self.assertEqual(
1747 'NeutronClientException: An unknown exception occurred.', 1771 'NeutronClientException: resources.nat_pool: '
1748 str(error)) 1772 'An unknown exception occurred.',
1773 six.text_type(error))
1749 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state) 1774 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state)
1750 self.m.VerifyAll() 1775 self.m.VerifyAll()
1751 1776
@@ -1782,8 +1807,9 @@ class NATPoolTest(HeatTestCase):
1782 error = self.assertRaises(exception.ResourceFailure, 1807 error = self.assertRaises(exception.ResourceFailure,
1783 scheduler.TaskRunner(rsrc.delete)) 1808 scheduler.TaskRunner(rsrc.delete))
1784 self.assertEqual( 1809 self.assertEqual(
1785 'NeutronClientException: An unknown exception occurred.', 1810 'NeutronClientException: resources.nat_pool: '
1786 str(error)) 1811 'An unknown exception occurred.',
1812 six.text_type(error))
1787 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state) 1813 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state)
1788 self.m.VerifyAll() 1814 self.m.VerifyAll()
1789 1815
diff --git a/gbpautomation/heat/tests/test_servicechain.py b/gbpautomation/heat/tests/test_servicechain.py
index 8ea8094..42d0135 100644
--- a/gbpautomation/heat/tests/test_servicechain.py
+++ b/gbpautomation/heat/tests/test_servicechain.py
@@ -11,6 +11,7 @@
11# under the License. 11# under the License.
12 12
13import copy 13import copy
14import six
14 15
15from gbpautomation.heat.engine.resources import servicechain 16from gbpautomation.heat.engine.resources import servicechain
16from gbpclient.v2_0 import client as gbpclient 17from gbpclient.v2_0 import client as gbpclient
@@ -81,10 +82,11 @@ class ServiceChainNodeTest(HeatTestCase):
81 }).AndReturn({'servicechain_node': {'id': '5678'}}) 82 }).AndReturn({'servicechain_node': {'id': '5678'}})
82 83
83 snippet = template_format.parse(servicechain_node_template) 84 snippet = template_format.parse(servicechain_node_template)
84 stack = utils.parse_stack(snippet) 85 self.stack = utils.parse_stack(snippet)
85 resource_defns = stack.t.resource_definitions(stack) 86 resource_defns = self.stack.t.resource_definitions(self.stack)
86 return servicechain.ServiceChainNode( 87 return servicechain.ServiceChainNode(
87 'servicechain_node', resource_defns['servicechain_node'], stack) 88 'servicechain_node', resource_defns['servicechain_node'],
89 self.stack)
88 90
89 def test_create(self): 91 def test_create(self):
90 rsrc = self.create_servicechain_node() 92 rsrc = self.create_servicechain_node()
@@ -105,16 +107,18 @@ class ServiceChainNodeTest(HeatTestCase):
105 self.m.ReplayAll() 107 self.m.ReplayAll()
106 108
107 snippet = template_format.parse(servicechain_node_template) 109 snippet = template_format.parse(servicechain_node_template)
108 stack = utils.parse_stack(snippet) 110 self.stack = utils.parse_stack(snippet)
109 resource_defns = stack.t.resource_definitions(stack) 111 resource_defns = self.stack.t.resource_definitions(self.stack)
110 rsrc = servicechain.ServiceChainNode( 112 rsrc = servicechain.ServiceChainNode(
111 'servicechain_node', resource_defns['servicechain_node'], stack) 113 'servicechain_node', resource_defns['servicechain_node'],
114 self.stack)
112 115
113 error = self.assertRaises(exception.ResourceFailure, 116 error = self.assertRaises(exception.ResourceFailure,
114 scheduler.TaskRunner(rsrc.create)) 117 scheduler.TaskRunner(rsrc.create))
115 self.assertEqual( 118 self.assertEqual(
116 'NeutronClientException: An unknown exception occurred.', 119 'NeutronClientException: resources.servicechain_node: '
117 str(error)) 120 'An unknown exception occurred.',
121 six.text_type(error))
118 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state) 122 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state)
119 self.m.VerifyAll() 123 self.m.VerifyAll()
120 124
@@ -151,8 +155,9 @@ class ServiceChainNodeTest(HeatTestCase):
151 error = self.assertRaises(exception.ResourceFailure, 155 error = self.assertRaises(exception.ResourceFailure,
152 scheduler.TaskRunner(rsrc.delete)) 156 scheduler.TaskRunner(rsrc.delete))
153 self.assertEqual( 157 self.assertEqual(
154 'NeutronClientException: An unknown exception occurred.', 158 'NeutronClientException: resources.servicechain_node: '
155 str(error)) 159 'An unknown exception occurred.',
160 six.text_type(error))
156 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state) 161 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state)
157 self.m.VerifyAll() 162 self.m.VerifyAll()
158 163
@@ -190,10 +195,11 @@ class ServiceChainSpecTest(HeatTestCase):
190 }).AndReturn({'servicechain_spec': {'id': '5678'}}) 195 }).AndReturn({'servicechain_spec': {'id': '5678'}})
191 196
192 snippet = template_format.parse(servicechain_spec_template) 197 snippet = template_format.parse(servicechain_spec_template)
193 stack = utils.parse_stack(snippet) 198 self.stack = utils.parse_stack(snippet)
194 resource_defns = stack.t.resource_definitions(stack) 199 resource_defns = self.stack.t.resource_definitions(self.stack)
195 return servicechain.ServiceChainSpec( 200 return servicechain.ServiceChainSpec(
196 'servicechain_spec', resource_defns['servicechain_spec'], stack) 201 'servicechain_spec', resource_defns['servicechain_spec'],
202 self.stack)
197 203
198 def test_create(self): 204 def test_create(self):
199 rsrc = self.create_servicechain_spec() 205 rsrc = self.create_servicechain_spec()
@@ -213,16 +219,18 @@ class ServiceChainSpecTest(HeatTestCase):
213 self.m.ReplayAll() 219 self.m.ReplayAll()
214 220
215 snippet = template_format.parse(servicechain_spec_template) 221 snippet = template_format.parse(servicechain_spec_template)
216 stack = utils.parse_stack(snippet) 222 self.stack = utils.parse_stack(snippet)
217 resource_defns = stack.t.resource_definitions(stack) 223 resource_defns = self.stack.t.resource_definitions(self.stack)
218 rsrc = servicechain.ServiceChainSpec( 224 rsrc = servicechain.ServiceChainSpec(
219 'servicechain_spec', resource_defns['servicechain_spec'], stack) 225 'servicechain_spec', resource_defns['servicechain_spec'],
226 self.stack)
220 227
221 error = self.assertRaises(exception.ResourceFailure, 228 error = self.assertRaises(exception.ResourceFailure,
222 scheduler.TaskRunner(rsrc.create)) 229 scheduler.TaskRunner(rsrc.create))
223 self.assertEqual( 230 self.assertEqual(
224 'NeutronClientException: An unknown exception occurred.', 231 'NeutronClientException: resources.servicechain_spec: '
225 str(error)) 232 'An unknown exception occurred.',
233 six.text_type(error))
226 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state) 234 self.assertEqual((rsrc.CREATE, rsrc.FAILED), rsrc.state)
227 self.m.VerifyAll() 235 self.m.VerifyAll()
228 236
@@ -259,8 +267,9 @@ class ServiceChainSpecTest(HeatTestCase):
259 error = self.assertRaises(exception.ResourceFailure, 267 error = self.assertRaises(exception.ResourceFailure,
260 scheduler.TaskRunner(rsrc.delete)) 268 scheduler.TaskRunner(rsrc.delete))
261 self.assertEqual( 269 self.assertEqual(
262 'NeutronClientException: An unknown exception occurred.', 270 'NeutronClientException: resources.servicechain_spec: '
263 str(error)) 271 'An unknown exception occurred.',
272 six.text_type(error))
264 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state) 273 self.assertEqual((rsrc.DELETE, rsrc.FAILED), rsrc.state)
265 self.m.VerifyAll() 274 self.m.VerifyAll()
266 275