'Assert allowed HTTP methods reported in the Allow response header'

def _assert_allows(self, response, *expected_methods):

    response_allows = set(response['Allow'].split(',    '))
    self.assertEqual(set((expected_methods + ('OPTIONS',))), response_allows)
