File tree 3 files changed +13
-8
lines changed
3 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 3
3
4
4
settings = Dynaconf (
5
5
envvar_prefix = "DYNACONF" ,
6
- settings_files = [' settings.toml' , ' .secrets.toml' ],
6
+ settings_files = [" settings.toml" , " .secrets.toml" ],
7
7
)
8
8
9
9
settings .PROJECT_ROOT = pathlib .Path (__file__ ).parent .parent
10
- settings .TEST_DATA_DIR = settings .PROJECT_ROOT / ' tests' / ' test_data'
10
+ settings .TEST_DATA_DIR = settings .PROJECT_ROOT / " tests" / " test_data"
11
11
# `envvar_prefix` = export envvars with `export DYNACONF_FOO=bar`.
12
12
# `settings_files` = Load these files in the order.
Original file line number Diff line number Diff line change 1
1
from setuptools import setup , find_packages
2
2
3
3
setup (
4
- name = ' options_framework' ,
5
- version = ' 0.1.0' ,
4
+ name = " options_framework" ,
5
+ version = " 0.1.0" ,
6
6
packages = find_packages (),
7
7
)
Original file line number Diff line number Diff line change 1
1
import pathlib
2
- import pytest
3
- from dynaconf import Dynaconf
4
2
from options_framework import config
5
3
4
+
6
5
def test_project_root ():
7
6
assert config .settings .PROJECT_ROOT == pathlib .Path (__file__ ).parent .parent
7
+ assert (
8
+ config .settings .TEST_DATA_DIR
9
+ == config .settings .PROJECT_ROOT / "tests" / "test_data"
10
+ )
11
+
8
12
9
13
def test_settings_toml_exists ():
10
- assumed_path = config .settings .PROJECT_ROOT / "settings.toml"
11
- assert assumed_path .exists ()
14
+ expected_settings_toml_path = config .settings .PROJECT_ROOT / "settings.toml"
15
+ assert expected_settings_toml_path .exists ()
16
+
12
17
13
18
def test_settings_toml_file_has_default_message ():
14
19
assert config .settings .DEFAULT_MESSAGE == "Default message"
You can’t perform that action at this time.
0 commit comments