summaryrefslogtreecommitdiff
path: root/tests/test_envtoolkit_instance.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_envtoolkit_instance.py')
-rw-r--r--tests/test_envtoolkit_instance.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/test_envtoolkit_instance.py b/tests/test_envtoolkit_instance.py
index 5137e9f..3235736 100644
--- a/tests/test_envtoolkit_instance.py
+++ b/tests/test_envtoolkit_instance.py
@@ -20,9 +20,8 @@ import pytest
20import etoolkit 20import etoolkit
21 21
22 22
23def test_instantiation(config_data): 23def test_instantiation(config_data: dict) -> None:
24 """Tests for object instatiation""" 24 """Tests for object instatiation"""
25
26 with pytest.raises(etoolkit.EtoolkitInstanceError) as exc_info: 25 with pytest.raises(etoolkit.EtoolkitInstanceError) as exc_info:
27 instance = etoolkit.EtoolkitInstance('devv', config_data) 26 instance = etoolkit.EtoolkitInstance('devv', config_data)
28 assert exc_info.type is etoolkit.EtoolkitInstanceError 27 assert exc_info.type is etoolkit.EtoolkitInstanceError
@@ -43,10 +42,12 @@ def test_instantiation(config_data):
43 42
44 43
45def test_get_environ( 44def test_get_environ(
46 config_data, master_password, short_value, wrong_master_password 45 config_data: dict,
47): 46 master_password: str,
47 short_value: str,
48 wrong_master_password: str,
49) -> None:
48 """Tests the EtoolkitInstance.get_environ method""" 50 """Tests the EtoolkitInstance.get_environ method"""
49
50 instance = etoolkit.EtoolkitInstance('secret', config_data) 51 instance = etoolkit.EtoolkitInstance('secret', config_data)
51 with pytest.raises(etoolkit.EtoolkitInstanceError) as exc_info: 52 with pytest.raises(etoolkit.EtoolkitInstanceError) as exc_info:
52 env = instance.get_environ() 53 env = instance.get_environ()
@@ -68,16 +69,14 @@ def test_get_environ(
68 assert 'ETOOLKIT_TEST_PASSWORD2' in instance.sensitive_env_variables 69 assert 'ETOOLKIT_TEST_PASSWORD2' in instance.sensitive_env_variables
69 70
70 71
71def test_get_full_name(config_data): 72def test_get_full_name(config_data: dict) -> None:
72 """Tests the EtoolkitInstance.get_full_name method""" 73 """Tests the EtoolkitInstance.get_full_name method"""
73
74 instance = etoolkit.EtoolkitInstance('secret', config_data) 74 instance = etoolkit.EtoolkitInstance('secret', config_data)
75 assert instance.get_full_name('->') == '_default->secret' 75 assert instance.get_full_name('->') == '_default->secret'
76 76
77 77
78def test_parent_vars(config_data): 78def test_parent_vars(config_data: dict) -> None:
79 """Tests the EtoolkitInstance.get_full_name method""" 79 """Tests the EtoolkitInstance.get_full_name method"""
80
81 instance = etoolkit.EtoolkitInstance('dev', config_data) 80 instance = etoolkit.EtoolkitInstance('dev', config_data)
82 assert instance.get_full_name('->') == '_default->dev' 81 assert instance.get_full_name('->') == '_default->dev'
83 assert instance.get_environ()['ETOOLKIT_TEST_PYTHONPATH'] == ( 82 assert instance.get_environ()['ETOOLKIT_TEST_PYTHONPATH'] == (