===================================================================== --- Changes ------------------------------ - updated python scwrypts API to use latest pattern established in the nodejs library - SCWRYPTS_ROOT__scwrypts is now supports loading with each run and detects managed installations vs manual installations; this now means SCWRYPTS_ROOT can no longer be injected to scwrypts (this was a v2 legacy support thing and probably does not apply to you) --- New Features ------------------------- - pypi/scwrypts ) added 'get_generator' API to testing utilities to provide a nice way to include default generator options --- Bug Fixes ---------------------------- - scwrypts groups which use a required environment name regex no longer load specialized static files outside of the required environments.
25 lines
903 B
Python
25 lines
903 B
Python
from string import ascii_letters, digits
|
|
from types import SimpleNamespace
|
|
|
|
from pytest import fixture
|
|
|
|
from scwrypts.test.character_set import uri
|
|
from ..conftest import generate, get_request_client_sample_data
|
|
|
|
@fixture(name='sample')
|
|
def fixture_sample():
|
|
return SimpleNamespace(
|
|
**{
|
|
**get_request_client_sample_data(),
|
|
'base_url': 'https://discord.com/api',
|
|
},
|
|
bot_token = generate(str, {'character_set': uri}),
|
|
username = generate(str, {'character_set': ascii_letters + digits}),
|
|
avatar_url = generate(str, {'character_set': uri}),
|
|
webhook = generate(str, {'character_set': uri}),
|
|
channel_id = generate(str, {'character_set': uri}),
|
|
content_header = generate(str),
|
|
content_footer = generate(str),
|
|
content = generate(str),
|
|
)
|