How to use delete_retention_policy method in localstack

Best Python code snippet using localstack_python

test_service_properties.py

Source: test_service_properties.py Github

copy

Full Screen

...137 # Assert138 received_props = self.bs.get_blob_service_properties()139 self.assertEqual(received_props.target_version, '2014-02-14')140 @record141 def test_set_delete_retention_policy(self):142 # Arrange143 delete_retention_policy = DeleteRetentionPolicy(enabled=True, days=2)144 # Act145 self.bs.set_blob_service_properties(delete_retention_policy=delete_retention_policy)146 # Assert147 received_props = self.bs.get_blob_service_properties()148 self._assert_delete_retention_policy_equal(received_props.delete_retention_policy, delete_retention_policy)149 @record150 def test_set_delete_retention_policy_edge_cases(self):151 # Should work with minimum settings152 delete_retention_policy = DeleteRetentionPolicy(enabled=True, days=1)153 self.bs.set_blob_service_properties(delete_retention_policy=delete_retention_policy)154 # Assert155 received_props = self.bs.get_blob_service_properties()156 self._assert_delete_retention_policy_equal(received_props.delete_retention_policy, delete_retention_policy)157 # Should work with maximum settings158 delete_retention_policy = DeleteRetentionPolicy(enabled=True, days=365)159 self.bs.set_blob_service_properties(delete_retention_policy=delete_retention_policy)160 # Assert161 received_props = self.bs.get_blob_service_properties()162 self._assert_delete_retention_policy_equal(received_props.delete_retention_policy, delete_retention_policy)163 # Should not work with 0 days164 delete_retention_policy = DeleteRetentionPolicy(enabled=True, days=0)165 with self.assertRaises(AzureHttpError):166 self.bs.set_blob_service_properties(delete_retention_policy=delete_retention_policy)167 # Assert168 received_props = self.bs.get_blob_service_properties()169 self._assert_delete_retention_policy_not_equal(received_props.delete_retention_policy, delete_retention_policy)170 # Should not work with 366 days171 delete_retention_policy = DeleteRetentionPolicy(enabled=True, days=366)172 with self.assertRaises(AzureHttpError):173 self.bs.set_blob_service_properties(delete_retention_policy=delete_retention_policy)174 # Assert175 received_props = self.bs.get_blob_service_properties()176 self._assert_delete_retention_policy_not_equal(received_props.delete_retention_policy, delete_retention_policy)177 @record178 def test_set_disabled_delete_retention_policy(self):179 # Arrange180 delete_retention_policy = DeleteRetentionPolicy(enabled=False)181 # Act182 self.bs.set_blob_service_properties(delete_retention_policy=delete_retention_policy)183 # Assert184 received_props = self.bs.get_blob_service_properties()185 self._assert_delete_retention_policy_equal(received_props.delete_retention_policy, delete_retention_policy)186 @record187 def test_set_static_website_properties(self):188 # Arrange189 static_website = StaticWebsite(enabled=True, index_document="index.html",190 error_document_404_path="errors/​error/​404error.html")191 # Act192 self.bs.set_blob_service_properties(static_website=static_website)...

Full Screen

Full Screen

get_blob_service_properties.py

Source: get_blob_service_properties.py Github

copy

Full Screen

...51 """52 return pulumi.get(self, "default_service_version")53 @property54 @pulumi.getter(name="deleteRetentionPolicy")55 def delete_retention_policy(self) -> Optional['outputs.DeleteRetentionPolicyResponse']:56 """57 The blob service properties for soft delete.58 """59 return pulumi.get(self, "delete_retention_policy")60 @property61 @pulumi.getter62 def id(self) -> str:63 """64 Fully qualified resource ID for the resource. Ex - /​subscriptions/​{subscriptionId}/​resourceGroups/​{resourceGroupName}/​providers/​{resourceProviderNamespace}/​{resourceType}/​{resourceName}65 """66 return pulumi.get(self, "id")67 @property68 @pulumi.getter69 def name(self) -> str:...

Full Screen

Full Screen

Blogs

Check out the latest blogs from LambdaTest on this topic:

Oct’22 Updates: New Analytics And App Automation Dashboard, Test On Google Pixel 7 Series, And More

Hey everyone! We hope you had a great Hacktober. At LambdaTest, we thrive to bring you the best with each update. Our engineering and tech teams work at lightning speed to deliver you a seamless testing experience.

Do you possess the necessary characteristics to adopt an Agile testing mindset?

To understand the agile testing mindset, we first need to determine what makes a team “agile.” To me, an agile team continually focuses on becoming self-organized and cross-functional to be able to complete any challenge they may face during a project.

How to Recognize and Hire Top QA / DevOps Engineers

With the rising demand for new services and technologies in the IT, manufacturing, healthcare, and financial sector, QA/ DevOps engineering has become the most important part of software companies. Below is a list of some characteristics to look for when interviewing a potential candidate.

Quick Guide To Drupal Testing

Dries Buytaert, a graduate student at the University of Antwerp, came up with the idea of developing something similar to a chat room. Moreover, he modified the conventional chat rooms into a website where his friends could post their queries and reply through comments. However, for this project, he thought of creating a temporary archive of posts.

What is coaching leadership

Coaching is a term that is now being mentioned a lot more in the leadership space. Having grown successful teams I thought that I was well acquainted with this subject.

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run localstack automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful