Accept sha256 hash for swift tempurl
Since swiftclient 4.0.1, sha256 is used when generating tempurl
signature[1].
This change extends the regex pattern to assert signatues so that it
can accept both sha1(old) and sha256(current).
[1]
@@ -292,7 +292,7 @@ class TempURLSignalTest(testtools.TestCase):
url = deployment_utils.create_temp_url(swift_client, 'bar', 60)
self.assertFalse(swift_client.post_account.called)
regexp = (r"http://fake-host.com:8080/v1/AUTH_demo/bar-%s"
- r"/%s\?temp_url_sig=[0-9a-f]{40}&"
+ r"/%s\?temp_url_sig=[0-9a-f]{40,64}&"
r"temp_url_expires=[0-9]{10}" % (uuid_pattern, uuid_pattern))
self.assertThat(url, matchers.MatchesRegex(regexp))
