Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete config #408

Merged
merged 3 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions config/adsim.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions config/bl38p.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions config/bl45p.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions config/defaults.yaml

This file was deleted.

12 changes: 1 addition & 11 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pytest
from pydantic import BaseModel, Field

from blueapi.config import ApplicationConfig, BasicAuthentication, ConfigLoader
from blueapi.config import BasicAuthentication, ConfigLoader
from blueapi.utils import InvalidConfigError


Expand Down Expand Up @@ -119,16 +119,6 @@ def test_error_thrown_if_schema_does_not_match_yaml(nested_config_yaml: Path) ->
loader.load()


def test_example_config_yaml_gives_same_config_as_model(default_yaml: Path):
loader = ConfigLoader(ApplicationConfig)
default_config = loader.load()

loader.use_values_from_yaml(default_yaml)
yaml_config = loader.load()

assert default_config == yaml_config


@mock.patch.dict(os.environ, {"FOO": "bar"}, clear=True)
def test_auth_from_env():
auth = BasicAuthentication(username="${FOO}", passcode="baz")
Expand Down
Loading