Commit 8591fc4d authored by rajesh's avatar rajesh

Display settings without args

- Add test for empty variable for settings
parent 5343d163
Pipeline #1578 passed with stages
in 38 seconds
......@@ -220,6 +220,8 @@ def settings(*names):
MEDIA_ROOT=$(djcli settings --value MEDIA_ROOT)
"""
from django.conf import settings
if len(names) < 1:
names = dir(settings)
for name in names:
if 'value' in clitoo.context.args:
......
......@@ -132,9 +132,17 @@ def test_settings(capsys):
assert 'AUTOCOMMIT' in cap.out
@pytest.mark.django_db
def test_empty_settings(capsys):
"""Test settings method and to check settings all variable."""
djcli.settings()
cap = capsys.readouterr()
assert 'LANGUAGES' in cap.out
@pytest.mark.django_db
def test_save_for_args_or_kwargs(capsys):
"""Test save method for args or kwargs.
"""Test save method for args and kwargs.
Create new user 'TestUser1' for args and kwargs
Test usernames:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment