Merge "Do not use $ in regex"
This commit is contained in:
commit
74de2ed1e9
@ -59,7 +59,7 @@ class TestDataUtils(base.TestCase):
|
||||
def test_rand_password(self):
|
||||
actual = data_utils.rand_password()
|
||||
self.assertIsInstance(actual, str)
|
||||
self.assertRegex(actual, "[A-Za-z0-9~!@#$%^&*_=+]{15,}")
|
||||
self.assertRegex(actual, "[A-Za-z0-9~!@#%^&*_=+]{15,}")
|
||||
actual2 = data_utils.rand_password()
|
||||
self.assertNotEqual(actual, actual2)
|
||||
|
||||
@ -67,7 +67,7 @@ class TestDataUtils(base.TestCase):
|
||||
actual = data_utils.rand_password(8)
|
||||
self.assertIsInstance(actual, str)
|
||||
self.assertEqual(len(actual), 8)
|
||||
self.assertRegex(actual, "[A-Za-z0-9~!@#$%^&*_=+]{8}")
|
||||
self.assertRegex(actual, "[A-Za-z0-9~!@#%^&*_=+]{8}")
|
||||
actual2 = data_utils.rand_password(8)
|
||||
self.assertNotEqual(actual, actual2)
|
||||
|
||||
@ -75,7 +75,7 @@ class TestDataUtils(base.TestCase):
|
||||
actual = data_utils.rand_password(2)
|
||||
self.assertIsInstance(actual, str)
|
||||
self.assertEqual(len(actual), 3)
|
||||
self.assertRegex(actual, "[A-Za-z0-9~!@#$%^&*_=+]{3}")
|
||||
self.assertRegex(actual, "[A-Za-z0-9~!@#%^&*_=+]{3}")
|
||||
actual2 = data_utils.rand_password(2)
|
||||
self.assertNotEqual(actual, actual2)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user