How to use test_trust_expire method in tempest

Best Python code snippet using tempest_python

test_trusts.py

Source:test_trusts.py Github

copy

Full Screen

...178 trust_get = self.get_trust()179 self.validate_trust(trust_get, impersonate=False)180 self.check_trust_roles()181 @test.idempotent_id('0ed14b66-cefd-4b5c-a964-65759453e292')182 def test_trust_expire(self):183 # Test case to check we can create, get and delete a trust184 # with an expiry specified185 expires_at = timeutils.utcnow() + datetime.timedelta(hours=1)186 # NOTE(ylobankov) In some cases the expiry time may be rounded up187 # because of microseconds. In fact, it depends on database and its188 # version. At least MySQL 5.6.16 does this.189 # For example, when creating a trust, we will set the expiry time of190 # the trust to 2015-02-17T17:34:01.907051Z. However, if we make a GET191 # request on the trust, the response will contain the time rounded up192 # to 2015-02-17T17:34:02.000000Z. That is why we shouldn't set flag193 # "subsecond" to True when we invoke timeutils.isotime(...) to avoid194 # problems with rounding.195 expires_str = timeutils.isotime(at=expires_at)196 trust = self.create_trust(expires=expires_str)...

Full Screen

Full Screen

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 tempest 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