Skip to main content

No project description provided

Project description

pytest-simple-settings

PyPI version Build Status

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

pytest-simple-settings-0.1.1.tar.gz (1.9 kB view details)

Uploaded Source

Built Distributions

pytest_simple_settings-0.1.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

pytest_simple_settings-0.1.1-py2-none-any.whl (3.5 kB view details)

Uploaded Python 2

File details

Details for the file pytest-simple-settings-0.1.1.tar.gz.

File metadata

  • Download URL: pytest-simple-settings-0.1.1.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for pytest-simple-settings-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c9fed04fb0da8d3cd28518d042ffd9a9ef1951e7819569db2f536096d142bcad
MD5 c69fce774c4b93d618d22ed13b00192e
BLAKE2b-256 d423fdeca4b601978d6ed12d7c4086ed1099cace3031639cd5217efb57d64d2a

See more details on using hashes here.

File details

Details for the file pytest_simple_settings-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pytest_simple_settings-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for pytest_simple_settings-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 22a00239a52c379f3c6e6e5e28718e280a51297ddc73c6c31f6cbec8086d5b4e
MD5 9939d6ad77ed1c097967f8da977be270
BLAKE2b-256 3fd2cff8c5a336ab1146f6b642bd8f2c1c0b7b98c11c79175c4095baf789b9e2

See more details on using hashes here.

File details

Details for the file pytest_simple_settings-0.1.1-py2-none-any.whl.

File metadata

  • Download URL: pytest_simple_settings-0.1.1-py2-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 2
  • Uploaded using 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

File hashes

Hashes for pytest_simple_settings-0.1.1-py2-none-any.whl
Algorithm Hash digest
SHA256 897c87d9e714955a50f886a76db8166798e7a0dc7e157df69d570e6b1e9ae554
MD5 e137a574c1d2804daf9c51470a57d9c1
BLAKE2b-256 ec27ec8723c9250de9251ce9ec5bbe7dd6b896ae037e6e043592a790bfeb657d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page