예제 #1
0
 def test_missing_field(self):
     event = {
         "RequestType": RequestType.CREATE,
         "ResponseURL": "https://test.url",
         "StackId": None,
         "RequestId": None,
         "ResourceType": None,
     }
     self.assertFalse(is_valid_event(event))
예제 #2
0
 def test_missing_physical(self):
     event = {
         "RequestType": RequestType.UPDATE,
         "ResponseURL": "https://test.url",
         "StackId": None,
         "RequestId": None,
         "ResourceType": None,
         "LogicalResourceId": None
     }
     self.assertFalse(is_valid_event(event))
예제 #3
0
 def test_invalid_url(self):
     event = {
         "RequestType": RequestType.CREATE,
         "ResponseURL": "ftp://test.url",
         "StackId": None,
         "RequestId": None,
         "ResourceType": None,
         "LogicalResourceId": None
     }
     self.assertFalse(is_valid_event(event))
예제 #4
0
 def test_no_valid_request_type(self):
     event = {
         "RequestType": "DESTROY",
         "ResponseURL": "https://test.url",
         "StackId": None,
         "RequestId": None,
         "ResourceType": None,
         "LogicalResourceId": None
     }
     self.assertFalse(is_valid_event(event))
예제 #5
0
 def test_included_physical(self):
     event = {
         "RequestType": RequestType.DELETE,
         "ResponseURL": "https://test.url",
         "StackId": None,
         "RequestId": None,
         "ResourceType": None,
         "LogicalResourceId": None,
         "PhysicalResourceId": None
     }
     self.assertTrue(is_valid_event(event))