MCPcopy Create free account
hub / github.com/theskumar/python-dotenv / test_to_cli_string

Function test_to_cli_string

tests/test_utils.py:4–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2
3
4def test_to_cli_string():
5 assert c() == 'dotenv'
6 assert c(path='/etc/.env') == 'dotenv -f /etc/.env'
7 assert c(path='/etc/.env', action='list') == 'dotenv -f /etc/.env list'
8 assert c(action='list') == 'dotenv list'
9 assert c(action='get', key='DEBUG') == 'dotenv get DEBUG'
10 assert c(action='set', key='DEBUG', value='True') == 'dotenv set DEBUG True'
11 assert c(action='set', key='SECRET', value='=@asdfasf') == 'dotenv set SECRET =@asdfasf'
12 assert c(action='set', key='SECRET', value='a b') == 'dotenv set SECRET "a b"'
13 assert c(action='set', key='SECRET', value='a b', quote="always") == 'dotenv -q always set SECRET "a b"'

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected