File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ def test_django_settings(manage):
164164
165165def 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.
Original file line number Diff line number Diff 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)
2929def 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
You can’t perform that action at this time.
0 commit comments