Skip to content

Commit aa3aa3e

Browse files
committed
Fix sonarcloud for python:S2245
1 parent fef22fc commit aa3aa3e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_init.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from pprint import PrettyPrinter
1111

1212
# String generation
13-
import random
13+
import secrets
1414
import string
1515

1616
# Testing
@@ -251,7 +251,9 @@ async def connect(
251251
):
252252
"""Connect to a smile environment and perform basic asserts."""
253253
port = aiohttp.test_utils.unused_port()
254-
test_password = "".join(random.choice(string.ascii_lowercase) for i in range(8))
254+
test_password = "".join(
255+
secrets.choice(string.ascii_lowercase) for i in range(8)
256+
)
255257

256258
# Happy flow
257259
app = await self.setup_app(broken, timeout, raise_timeout, fail_auth, stretch)

0 commit comments

Comments
 (0)