simple-settings plugin for pytest
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 Distribution
Close
Hashes for pytest-simple-settings-0.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76c54ee110a1e94c5de28a50ebd5e643f9e6325c4a593091973dd0900eaaec91 |
|
MD5 | 48a6bdae15fa53b30caaa54ae103b574 |
|
BLAKE2b-256 | 7f3f3421de6abf3dafe787eaf21beea97426d0c567059ab9faf95402449b0dc1 |
Close
Hashes for pytest_simple_settings-0.1.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5de0d6d11dcce4b32e19d48e72918a83d9166a79a08e6c173c211e75e67f6e40 |
|
MD5 | 8ddbf028e58d9741902af6db88464e76 |
|
BLAKE2b-256 | 97935ad0dee3a397a52c62fb21b6e2f0f9905ee8b22a19aec9670cb451504eb0 |