Skip to content

Commit 94234f4

Browse files
committed
Merge pull request plotly#268 from plotly/more-random
Decrease chance of collisions… by a lot. (more)
2 parents 60a554d + bcd24a8 commit 94234f4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

plotly/tests/test_core/test_file/test_file.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import random
99
import string
1010
from unittest import TestCase
11-
from nose.tools import nottest
1211

1312
import plotly.plotly as py
1413
from plotly.exceptions import PlotlyRequestError
@@ -20,9 +19,9 @@ def setUp(self):
2019
py.sign_in('PythonTest', '9v9f20pext')
2120

2221
def _random_filename(self):
23-
random_chars = [random.choice(string.ascii_uppercase)
24-
for _ in range(5)]
25-
unique_filename = 'Valid Folder'+''.join(random_chars)
22+
choice_chars = string.ascii_letters + string.digits
23+
random_chars = [random.choice(choice_chars) for _ in range(10)]
24+
unique_filename = 'Valid Folder ' + ''.join(random_chars)
2625
return unique_filename
2726

2827
def test_create_folder(self):
@@ -41,7 +40,6 @@ def test_create_nested_folders(self):
4140
self.fail('Expected this *not* to fail! Status: {}'
4241
.format(e.status_code))
4342

44-
@nottest
4543
def test_duplicate_folders(self):
4644
first_folder = self._random_filename()
4745
py.file_ops.mkdirs(first_folder)

0 commit comments

Comments
 (0)