More detailed namespace validation
Fixes namespace validation to use the proper regex for checking length, as well as showing the proper messaging if the entered namespace is invalid [Delivers #137830461]
This commit is contained in:
parent
aafcb592a6
commit
462f47924e
7 changed files with 11 additions and 14 deletions
|
@ -651,7 +651,7 @@ class TestCreateNewUser(ApiTestCase):
|
|||
email='test@example.com'),
|
||||
expected_code=400)
|
||||
|
||||
self.assertEquals('Invalid username a: Username must be between 4 and 30 characters in length',
|
||||
self.assertEquals('Invalid namespace a: Namespace must be between 4 and 30 characters in length',
|
||||
json['detail'])
|
||||
|
||||
def test_trycreateregexmismatch(self):
|
||||
|
@ -661,7 +661,7 @@ class TestCreateNewUser(ApiTestCase):
|
|||
email='test@example.com'),
|
||||
expected_code=400)
|
||||
|
||||
self.assertEquals('Invalid username auserName: Username must match expression ^([a-z0-9]+(?:[._-][a-z0-9]+)*)$',
|
||||
self.assertEquals('Invalid namespace auserName: Namespace must match expression ^([a-z0-9]+(?:[._-][a-z0-9]+)*)$',
|
||||
json['detail'])
|
||||
|
||||
def test_createuser(self):
|
||||
|
|
Reference in a new issue