mirror of
https://github.com/status-im/status-go.git
synced 2026-08-31 00:51:12 +00:00
tests-functional/ -> test/functional/ tests-unit-network/ -> test/unit-network/ No Go code changes beyond the two package paths. Every reference follows: Makefile targets, the pytest-lint and reliability workflows, the three Jenkinsfiles, the root Dockerfile, pyrightconfig.json, .gitignore, the benchmark and functional-test scripts, and the docs. All paths inside the moved directories are self-contained (docker compose uses `context: .`, the Python helpers resolve from __file__), so the extra level of nesting does not reach outside. refs #7067
52 lines
1.1 KiB
Python
52 lines
1.1 KiB
Python
import random
|
|
from uuid import uuid4
|
|
|
|
from faker import Faker
|
|
|
|
# Use a single English locale to minimize provider loading
|
|
_faker = Faker("en")
|
|
|
|
|
|
def community_name() -> str:
|
|
ALLOWED_SPECIAL_CHARS = (".", "_", "-", " ")
|
|
return _faker.word() + _faker.random_element(ALLOWED_SPECIAL_CHARS) + str(_faker.random_number())
|
|
|
|
|
|
def community_channel_name() -> str:
|
|
return _faker.word()
|
|
|
|
|
|
def emoji() -> str:
|
|
return _faker.emoji()
|
|
|
|
|
|
def color() -> str:
|
|
return _faker.hex_color()
|
|
|
|
|
|
def community_description() -> str:
|
|
return _faker.sentence()
|
|
|
|
|
|
def profile_name() -> str:
|
|
length = random.randint(5, 24)
|
|
return _faker.pystr(min_chars=length, max_chars=length)
|
|
|
|
|
|
def profile_password(length: int = 8) -> str:
|
|
# Letters + digits; no special characters to keep compatibility
|
|
return _faker.password(length=length, special_chars=False)
|
|
|
|
|
|
def community_channel_identity() -> dict:
|
|
return {
|
|
"displayName": community_channel_name(),
|
|
"emoji": emoji(),
|
|
"color": color(),
|
|
"description": community_description(),
|
|
}
|
|
|
|
|
|
def address() -> str:
|
|
return "0x" + str(uuid4())[:8]
|