'Assert that the allowed methods for the given URI match the expected list'

def assertAllowedMethods(self, uri, expected_methods):

    resp = self.request_with_auth('options', uri)
    self.assertHttpOK(resp)
    allow_header = resp.get('Allow')
    self.assertIsNotNone(allow_header)
    allowed_methods = re.split('[^A-Z]+', allow_header)
    self.assertItemsEqual(allowed_methods, expected_methods)
