@pytest.mark.cmd
@pytest.mark.django_db
def test_list_projects_tutorial(capfd):
 call_command('list_projects')
 (out, err) = capfd.readouterr()
 assert ('project0' in out)
 assert ('project1' in out)

@ pytest . mark . cmd @ pytest . mark . django_db def test_list_projects_tutorial ( capfd ) : call_command ( 'list_projects' ) ( out , err ) = capfd . readouterr ( ) assert ( 'project0' in out ) assert ( 'project1' in out )
list site wide projects .