Merge "Add extra test for name_check /info"

This commit is contained in:
Jenkins
2017年03月21日 17:53:31 +00:00
committed by Gerrit Code Review

View File

@@ -137,6 +137,18 @@ class TestSwiftInfo(unittest.TestCase):
swift_info['name_check'].get('forbidden_regexp'),
str))
def test_registered_configured_options(self):
conf = {'maximum_length': 512,
'forbidden_chars': '\'\"`',
'forbidden_regexp': "/\./|/\.\./|/\.$"}
name_check.filter_factory(conf)(FakeApp())
swift_info = utils.get_swift_info()
self.assertTrue('name_check' in swift_info)
self.assertEqual(swift_info['name_check'].get('maximum_length'), 512)
self.assertEqual(set(swift_info['name_check'].get('forbidden_chars')),
set('\'\"`'))
self.assertEqual(swift_info['name_check'].get('forbidden_regexp'),
"/\./|/\.\./|/\.$")
if __name__ == '__main__':
unittest.main()
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.