Skip to content

Commit

Permalink
Merge pull request #1348 from hramezani/add_config_test
Browse files Browse the repository at this point in the history
Add test for `config.from_object`.
  • Loading branch information
yunstanford committed Oct 8, 2018
2 parents fe116ff + c796d73 commit 5cc12fd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@ class Config:
assert app.config.DEFAULT == 2


def test_overwrite_exisiting_config_ignore_lowercase(app):
app.config.default = 1

class Config:
default = 2

app.config.from_object(Config)
assert app.config.default == 1


def test_missing_config(app):
with pytest.raises(AttributeError) as e:
app.config.NON_EXISTENT
Expand Down

0 comments on commit 5cc12fd

Please sign in to comment.