We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 641153f commit 851e4a5Copy full SHA for 851e4a5
1 file changed
tests/__init__.py
@@ -11,22 +11,19 @@
11
# ANY KIND, either express or implied. See the License for the specific
12
# language governing permissions and limitations under the License.
13
14
-import random
15
-import time
16
import unittest
+import uuid
17
from unittest import mock
18
19
from botocore.compat import HAS_CRT
20
21
22
def unique_id(name):
23
"""
24
- Generate a unique ID that includes the given name,
25
- a timestamp and a random number. This helps when running
26
- integration tests in parallel that must create remote
27
- resources.
+ Generate a unique ID for integration tests
+ that create remote resources in parallel.
28
29
- return f'{name}-{int(time.time())}-{random.randint(0, 10000)}'
+ return f"{name}-{uuid.uuid4().hex}"
30
31
32
class BaseTestCase(unittest.TestCase):
0 commit comments