示例#1
0
 def test_is_boto_no_update_required_exception_returns_true_for_message(
         self):
     exception = Mock(spec=ClientError)
     exception.response = {
         "Error": {
             "Message": "No updates are to be performed."
         }
     }
     self.assertTrue(
         CloudFormation.is_boto_no_update_required_exception(exception))
示例#2
0
 def test_is_boto_no_update_required_exception_returns_true_for_message(self):
     exception = Mock(spec=ClientError)
     exception.response = {"Error": {"Message": "No updates are to be performed."}}
     self.assertTrue(CloudFormation.is_boto_no_update_required_exception(exception))
示例#3
0
 def test_is_boto_no_update_required_exception_returns_false_without_message(self):
     exception = Mock(spec=ClientError)
     exception.response = {"Error": {"Message": "Something went wrong"}}
     self.assertFalse(CloudFormation.is_boto_no_update_required_exception(exception))
示例#4
0
 def test_is_boto_no_update_required_exception_returns_false_with_other_exception(self):
     exception = Mock(spec=Exception)
     exception.message = "No updates are to be performed."
     self.assertFalse(CloudFormation.is_boto_no_update_required_exception(exception))
示例#5
0
 def test_is_boto_no_update_required_exception_returns_false_without_message(self):
     exception = Mock(spec=ClientError)
     exception.response = {"Error": {"Message": "Something went wrong"}}
     self.assertFalse(CloudFormation.is_boto_no_update_required_exception(exception))
示例#6
0
 def test_is_boto_no_update_required_exception_returns_false_with_other_exception(self):
     exception = Mock(spec=Exception)
     exception.message = "No updates are to be performed."
     self.assertFalse(CloudFormation.is_boto_no_update_required_exception(exception))
示例#7
0
 def test_is_boto_no_update_required_exception_returns_true_for_message(
         self):
     exception = Mock(spec=BotoServerError)
     exception.message = "No updates are to be performed."
     self.assertTrue(
         CloudFormation.is_boto_no_update_required_exception(exception))
示例#8
0
 def test_is_boto_no_update_required_exception_returns_false_without_message(
         self):
     exception = Mock(spec=BotoServerError)
     exception.message = "Something went wrong."
     self.assertFalse(
         CloudFormation.is_boto_no_update_required_exception(exception))
示例#9
0
 def test_is_boto_no_update_required_exception_returns_true_for_message(self):
     exception = Mock(spec=BotoServerError)
     exception.message = "No updates are to be performed."
     self.assertTrue(CloudFormation.is_boto_no_update_required_exception(exception))
示例#10
0
 def test_is_boto_no_update_required_exception_returns_false_without_message(self):
     exception = Mock(spec=BotoServerError)
     exception.message = "Something went wrong."
     self.assertFalse(CloudFormation.is_boto_no_update_required_exception(exception))