          self.assertEqual(tagged_system_check.kwargs, {'app_configs': None})
  
      @override_system_checks([simple_system_check, tagged_system_check])
      def test_invalid_tag(self):
          self.assertRaises(CommandError, call_command, 'check', tags=['missingtag'])
  
      @override_system_checks([simple_system_check])
      def test_list_tags_empty(self):
          call_command('check', list_tags=True)
          self.assertEqual('\n', sys.stdout.getvalue())
 
</s> remove         self.assertRaises(CommandError, management.call_command, ('explode',))
 </s> add         with self.assertRaises(CommandError):
            management.call_command(('explode',)) </s> remove         self.assertRaises(CommandError, popen_wrapper, ['a_42_command_that_doesnt_exist_42'])
 </s> add         with self.assertRaises(CommandError):
            popen_wrapper(['a_42_command_that_doesnt_exist_42']) </s> remove         self.assertRaises(AttributeError, self.client.get, '/detail/author/invalid/url/')
 </s> add         with self.assertRaises(AttributeError):
            self.client.get('/detail/author/invalid/url/') </s> remove         self.assertRaises(ValueError, self.assertNumQueries, 2, test_func)
 </s> add         with self.assertRaises(ValueError):
            self.assertNumQueries(2, test_func) </s> remove         self.assertRaises(ImproperlyConfigured, self.client.get, '/detail/author/invalid/qs/')
 </s> add         with self.assertRaises(ImproperlyConfigured):
            self.client.get('/detail/author/invalid/qs/')
        with self.assertRaises(CommandError):
            call_command('check', tags=['missingtag'])
          self.assertEqual(tagged_system_check.kwargs, {'app_configs': None})
  
      @override_system_checks([simple_system_check, tagged_system_check])
      def test_invalid_tag(self):
        with self.assertRaises(CommandError):
            call_command('check', tags=['missingtag'])
  
      @override_system_checks([simple_system_check])
      def test_list_tags_empty(self):
          call_command('check', list_tags=True)
          self.assertEqual('\n', sys.stdout.getvalue())
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/check_framework/tests.py