Skip to content

Commit 6aeeb7b

Browse files
committed
Fix tests
1 parent 10284ab commit 6aeeb7b

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

djclick/test/test_adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def test_django_settings(manage):
164164

165165
def test_django_color(capsys):
166166
call_command('colorcmd')
167-
out, err = capsys.readouterr()
167+
s out, err = capsys.readouterr()
168168
# Not passing a --color/--no-color flag defaults to autodetection. As the
169169
# command is run through the test suite, the autodetection defaults to not
170170
# colorizing the output.

djclick/test/test_params.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,18 @@ def test_modelinstance_init():
2121
@pytest.mark.parametrize(
2222
('arg', 'value'),
2323
(
24-
('--pk', '99'),
24+
('--pk', '1'),
2525
('--slug', 'test'),
2626
('--endswith', 'st'),
2727
)
2828
)
2929
def test_convert_ok(call_command, arg, value):
3030
from testapp.models import DummyModel
3131

32-
DummyModel.objects.create(slug='test')
32+
DummyModel.objects.create(pk=1, slug='test')
3333
expected = b'<DummyModel: 1>'
3434

35-
assert call_command('modelcmd', '--pk', '1').stdout == expected
36-
assert call_command('modelcmd', '--slug', 'test').stdout == expected
37-
assert call_command('modelcmd', '--endswith', 'test').stdout == expected
35+
assert call_command('modelcmd', arg, value).stdout == expected
3836

3937

4038
@pytest.mark.django_db

0 commit comments

Comments
 (0)