'All errors/warnings should be sorted by level and by message.'

def test_output_format(self):

    self.write_settings('settings.py', apps=['admin_scripts.app_raising_messages', 'django.contrib.auth', 'django.contrib.contenttypes'], sdict={'DEBUG': True})
    args = ['check']
    (out, err) = self.run_manage(args)
    expected_err = 'SystemCheckError:    System    check    identified    some    issues:\n\nERRORS:\n?:    An    error\n DCTB HINT:    Error    hint\n\nWARNINGS:\na:    Second    warning\nobj:    First    warning\n DCTB HINT:    Hint\n\nSystem    check    identified    3    issues    (0    silenced).\n'
    self.assertEqual(err, expected_err)
    self.assertNoOutput(out)
