summaryrefslogtreecommitdiff
path: root/tests/test_envtoolkit_instance.py
diff options
context:
space:
mode:
authorSimeon Simeonov2022-04-10 22:21:41 +0200
committerSimeon Simeonov2022-04-10 22:21:41 +0200
commitd15ee60ca7ad62004c5e036203f095cc27660f90 (patch)
tree0fc478fe2cab5cd670137ad4d4dbd75fd4b68b36 /tests/test_envtoolkit_instance.py
parente36f260c2ebc5e21724e5eedf0a91d2bc66cceec (diff)
Introduce a new macro (%p) representing the parent value of a given key
Diffstat (limited to 'tests/test_envtoolkit_instance.py')
-rw-r--r--tests/test_envtoolkit_instance.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/test_envtoolkit_instance.py b/tests/test_envtoolkit_instance.py
index 9061dc8..09baa31 100644
--- a/tests/test_envtoolkit_instance.py
+++ b/tests/test_envtoolkit_instance.py
@@ -1,5 +1,5 @@
1# etoolkit 1# etoolkit
2# Copyright (C) 2021-22 Simeon Simeonov 2# Copyright (C) 2021-2022 Simeon Simeonov
3 3
4# This program is free software: you can redistribute it and/or modify 4# This program is free software: you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -63,4 +63,13 @@ def test_get_environ(config_data):
63def test_get_full_name(config_data): 63def test_get_full_name(config_data):
64 """Tests the EtoolkitInstance.get_full_name method""" 64 """Tests the EtoolkitInstance.get_full_name method"""
65 instance = etoolkit.EtoolkitInstance('secret', config_data) 65 instance = etoolkit.EtoolkitInstance('secret', config_data)
66 assert instance.get_full_name('->') == 'default->secret' 66 assert instance.get_full_name('->') == '_default->secret'
67
68
69def test_parent_vars(config_data):
70 """Tests the EtoolkitInstance.get_full_name method"""
71 instance = etoolkit.EtoolkitInstance('dev', config_data)
72 assert instance.get_full_name('->') == '_default->dev'
73 assert instance.get_environ()['PYTHONPATH'] == (
74 '/home/foo/_default/python:/home/user/dev/.pythonpath'
75 )