No project description provided
Project description
pytest-simple-settings
Usage
With default simple_settings.settings
:
from simple_settings import settings
def test_foo(fake_settings):
fake_settings.FOO = 1
fake_settings.set(BAR=2)
assert settings.FOO == 1
assert settings.BAR == 2
With custom LazySettings
instance
import pytest
from simple_settings import LazySettings
instance = LazySettings('settings')
@pytest.fixture()
def settings_instance():
return instance
def test_foo(fake_settings):
fake_settings.FOO = 1
fake_settings.set(BAR=2)
assert instance.FOO == 1
assert instance.BAR == 2
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Close
Hashes for pytest-simple-settings-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9fed04fb0da8d3cd28518d042ffd9a9ef1951e7819569db2f536096d142bcad |
|
MD5 | c69fce774c4b93d618d22ed13b00192e |
|
BLAKE2b-256 | d423fdeca4b601978d6ed12d7c4086ed1099cace3031639cd5217efb57d64d2a |
Close
Hashes for pytest_simple_settings-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22a00239a52c379f3c6e6e5e28718e280a51297ddc73c6c31f6cbec8086d5b4e |
|
MD5 | 9939d6ad77ed1c097967f8da977be270 |
|
BLAKE2b-256 | 3fd2cff8c5a336ab1146f6b642bd8f2c1c0b7b98c11c79175c4095baf789b9e2 |
Close
Hashes for pytest_simple_settings-0.1.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 897c87d9e714955a50f886a76db8166798e7a0dc7e157df69d570e6b1e9ae554 |
|
MD5 | e137a574c1d2804daf9c51470a57d9c1 |
|
BLAKE2b-256 | ec27ec8723c9250de9251ce9ec5bbe7dd6b896ae037e6e043592a790bfeb657d |