def test_update_to_s3_url_with_dict(self): property_value = {"CodeUri": {"Bucket": "mybucket-name", "Key": "swagger", "Version": 121212}} SamTemplateValidator._update_to_s3_uri("CodeUri", property_value) self.assertEqual( property_value.get("CodeUri"), {"Bucket": "mybucket-name", "Key": "swagger", "Version": 121212} )
def test_update_to_s3_url_with_s3_uri(self): property_value = {"CodeUri": "s3://bucket/key/version"} SamTemplateValidator._update_to_s3_uri("CodeUri", property_value) self.assertEquals(property_value.get("CodeUri"), "s3://bucket/key/version")
def test_update_to_s3_url_with_dict(self): property_value = {"CodeUri": {"Bucket": "mybucket-name", "Key": "swagger", "Version": 121212}} SamTemplateValidator._update_to_s3_uri("CodeUri", property_value) self.assertEquals(property_value.get("CodeUri"), {"Bucket": "mybucket-name", "Key": "swagger", "Version": 121212})
def test_update_to_s3_uri_with_non_s3_uri(self): property_value = {"CodeUri": "somevalue"} SamTemplateValidator._update_to_s3_uri("CodeUri", property_value) self.assertEquals(property_value.get("CodeUri"), "s3://bucket/value")
def test_update_to_s3_uri_with_non_s3_uri(self): property_value = {"CodeUri": "somevalue"} SamTemplateValidator._update_to_s3_uri("CodeUri", property_value) self.assertEqual(property_value.get("CodeUri"), "s3://bucket/value")
def test_update_to_s3_url_with_s3_uri(self): property_value = {"CodeUri": "s3://bucket/key/version"} SamTemplateValidator._update_to_s3_uri("CodeUri", property_value) self.assertEqual(property_value.get("CodeUri"), "s3://bucket/key/version")