@pytest.mark.cmd
@pytest.mark.django_db
def test_test_checks_unit(capfd):
 units = Unit.objects.filter(state=TRANSLATED, target_f__endswith='%s.')
 call_command('test_checks', ('--unit=%s' % units.first().id))
 (out, err) = capfd.readouterr()
 assert ('No errors found' in out)

@ pytest . mark . cmd @ pytest . mark . django_db def test_test_checks_unit ( capfd ) : units = Unit . objects . filter ( state = TRANSLATED , target_f__endswith = '%s.' ) call_command ( 'test_checks' , ( '--unit=%s' % units . first ( ) . id ) ) ( out , err ) = capfd . readouterr ( ) assert ( 'No errors found' in out )
check a --unit .