aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_config_file.py
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2020-08-06 09:47:35 -0500
committerEugene Triguba <eugenetriguba@gmail.com>2020-08-06 09:47:35 -0500
commit836cefe45633331d0e5692295174bf3181a5e365 (patch)
tree8602b312e67cc591f33022f56221ca7434cfe33f /tests/test_config_file.py
parentUpdate README example to remove MissingKeyError (diff)
downloadconfig-file-836cefe45633331d0e5692295174bf3181a5e365.zip
Change MissingKeyErrors to KeyError
Diffstat (limited to 'tests/test_config_file.py')
-rw-r--r--tests/test_config_file.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/test_config_file.py b/tests/test_config_file.py
index 7e21e0b..023b6ae 100644
--- a/tests/test_config_file.py
+++ b/tests/test_config_file.py
@@ -4,7 +4,6 @@ import pytest
from config_file.abstract_parser import AbstractParser
from config_file.config_file import ConfigFile
-from config_file.exceptions import MissingKeyError
from config_file.ini_parser import IniParser
SUPPORTED_FILE_TYPES = ["ini", "json", "yaml", "toml"]
@@ -126,10 +125,10 @@ def test_that_config_file_can_delete(templated_config_file, key):
@pytest.mark.parametrize("key", ["", 0, False, {}, "header_one.does_not_exist"])
-def test_that_config_file_raises_missing_key_error_on_invalid_input_or_missing_key(
+def test_that_config_file_raises_key_error_on_invalid_input_or_missing_key(
templated_config_file, key
):
config = templated_config_file()
- with pytest.raises(MissingKeyError):
+ with pytest.raises(KeyError):
config.delete(key)