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
Metadata
Release files for pytest-simple-settings 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest-simple-settings-0.1.1.tar.gz | 1.9 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_simple_settings-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
| pytest_simple_settings-0.1.1-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 8.9 kB
Release files / pytest-simple-settings-0.1.1.tar.gz
| Download URL | pytest-simple-settings-0.1.1.tar.gz |
|---|---|
| Size | 1.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9fed04fb0da8d3cd28518d042ffd9a9ef1951e7819569db2f536096d142bcad
|
|
BLAKE2b-256 checksum How to use checksums |
d423fdeca4b601978d6ed12d7c4086ed1099cace3031639cd5217efb57d64d2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.14
|
Release files / pytest_simple_settings-0.1.1-py3-none-any.whl
| Download URL | pytest_simple_settings-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
22a00239a52c379f3c6e6e5e28718e280a51297ddc73c6c31f6cbec8086d5b4e
|
|
BLAKE2b-256 checksum How to use checksums |
3fd2cff8c5a336ab1146f6b642bd8f2c1c0b7b98c11c79175c4095baf789b9e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
|
Release files / pytest_simple_settings-0.1.1-py2-none-any.whl
| Download URL | pytest_simple_settings-0.1.1-py2-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
897c87d9e714955a50f886a76db8166798e7a0dc7e157df69d570e6b1e9ae554
|
|
BLAKE2b-256 checksum How to use checksums |
ec27ec8723c9250de9251ce9ec5bbe7dd6b896ae037e6e043592a790bfeb657d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.14
|