ut: cli - test_unique_path
This commit is contained in:
parent
0a3179a971
commit
90d723b01a
1 changed files with 16 additions and 0 deletions
16
tests/test_cli/test_unique_path.py
Normal file
16
tests/test_cli/test_unique_path.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import unittest
|
||||
|
||||
import loadcli
|
||||
|
||||
cli = loadcli.cli
|
||||
|
||||
|
||||
class TestUniquePath(unittest.TestCase):
|
||||
|
||||
def test_unique_path(self):
|
||||
for i in range(1000):
|
||||
self.assertNotEqual(cli._unique_path('prefix'), cli._unique_path('prefix'))
|
||||
self.assertRegexpMatches(cli._unique_path('prefix'), '^prefix/\d{10}\.\d{1,6}\.[a-zA-Z]{8}$')
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue