Merge "trivial: Replace assertRegexpMatches with assertRegex"

This commit is contained in:
Zuul
2022-03-24 00:33:27 +00:00
committed by Gerrit Code Review
4 changed files with 4 additions and 3 deletions

View File

@@ -485,7 +485,7 @@ class TestS3ApiMultiUpload(S3ApiBase):
expected_key = keys[0]
self.assertEqual(o.find('Key').text, expected_key)
self.assertIsNotNone(o.find('LastModified').text)
self.assertRegexpMatches(
self.assertRegex(
o.find('LastModified').text,
r'^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$')
self.assertEqual(o.find('ETag').text, exp_etag)

View File

@@ -90,7 +90,7 @@ class TestS3ApiPresignedUrls(S3ApiBase):
for o in resp_objects:
self.assertIn(o.find('Key').text, req_objects)
self.assertIsNotNone(o.find('LastModified').text)
self.assertRegexpMatches(
self.assertRegex(
o.find('LastModified').text,
r'^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$')
self.assertIsNotNone(o.find('ETag').text)