mirror of
https://github.com/searxng/searxng.git
synced 2026-07-31 12:21:24 +00:00
[mod] engines: replace [random.choice(...) for ... in range(..)] with random.choices
This commit is contained in:
@@ -13,7 +13,7 @@ from tests import SearxTestCase
|
||||
|
||||
|
||||
def random_string(length, choices=string.ascii_letters):
|
||||
return ''.join(random.choice(choices) for _ in range(length))
|
||||
return ''.join(random.choices(choices, k=length))
|
||||
|
||||
|
||||
class TestUtils(SearxTestCase):
|
||||
|
||||
Reference in New Issue
Block a user