have tempurl allow OPTIONS requests

Change-Id: I431cac1e9818a335ff8d20288ab6acf39d6b6d5e
This commit is contained in:
David Goetz
2013年05月07日 13:44:14 -07:00
parent 506a2b1fd0
commit d3bc10d0d7

View File

@@ -80,6 +80,7 @@ class TestTempURL(unittest.TestCase):
def setUp(self):
self.app = FakeApp()
self.auth = tempauth.filter_factory({})(self.app)
self.auth.reseller_prefix = 'a'
self.tempurl = tempurl.filter_factory({})(self.auth)
def _make_request(self, path, **kwargs):
@@ -92,6 +93,13 @@ class TestTempURL(unittest.TestCase):
self.assertEquals(resp.status_int, 401)
self.assertTrue('Temp URL invalid' not in resp.body)
def test_allow_options(self):
self.app.status_headers_body_iter = iter([('200 Ok', {}, '')])
resp = self._make_request(
'/v1/a/c/o?temp_url_sig=abcde&temp_url_expires=12345',
environ={'REQUEST_METHOD': 'OPTIONS'}).get_response(self.tempurl)
self.assertEquals(resp.status_int, 200)
def test_get_valid(self):
method = 'GET'
expires = int(time() + 86400)
Reference in New Issue
openstack/swift
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.