@pytest.mark.cmd
@pytest.mark.django_db
def test_refresh_scores_recalculate(capfd, admin, member):
 member.delete()
 admin.delete()
 call_command('refresh_scores')
 (out, err) = capfd.readouterr()
 assert ('Score for user system set to' in out)

@ pytest . mark . cmd @ pytest . mark . django_db def test_refresh_scores_recalculate ( capfd , admin , member ) : member . delete ( ) admin . delete ( ) call_command ( 'refresh_scores' ) ( out , err ) = capfd . readouterr ( ) assert ( 'Score for user system set to' in out )
recalculate scores .