File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -215,14 +215,22 @@ def test_activate_additional_environments():
215215 assert "part-2" in str (zc )
216216
217217
218- def test_activate_default_environment ():
218+ def test_activate_default_environment_from_config_file ():
219219 zc = zocalo .configuration .from_string (sample_configuration )
220220 e = zc .activate ([])
221221 assert e == ("default" ,)
222222 assert zc .active_environments == ("default" ,)
223223 assert "default" in str (zc )
224224
225225
226+ def test_activate_default_environment_from_environment_variable ():
227+ with mock .patch .dict (os .environ , {"ZOCALO_DEFAULT_ENV" : "partial" }):
228+ zc = zocalo .configuration .from_string (sample_configuration )
229+ e = zc .activate ([])
230+ assert e == ("partial" ,)
231+ assert zc .active_environments == ("partial" ,)
232+
233+
226234def test_activate_call_honours_default_flag ():
227235 zc = zocalo .configuration .from_string (sample_configuration )
228236 e = zc .activate ([], default = False )
You can’t perform that action at this time.
0 commit comments