def test_report_request(self):
     reporter = WeblateExceptionReporterFilter()
     result = reporter.get_request_repr(HttpRequest())
     self.assertIn(
         'HttpRequest',
         result
     )
 def test_report_none(self):
     reporter = WeblateExceptionReporterFilter()
     result = reporter.get_request_repr(None)
     self.assertEqual(
         'None',
         result
     )
Exemple #3
0
 def test_report_request(self):
     reporter = WeblateExceptionReporterFilter()
     request = HttpRequest()
     reporter.get_post_parameters(request)
     self.assertIn(
         'WEBLATE_VERSION:Weblate',
         request.META
     )
Exemple #4
0
 def test_report_request(self):
     reporter = WeblateExceptionReporterFilter()
     request = HttpRequest()
     reporter.get_post_parameters(request)
     self.assertIn(
         'WEBLATE_VERSION:Weblate',
         request.META
     )
 def test_report_language(self):
     reporter = WeblateExceptionReporterFilter()
     request = HttpRequest()
     request.session = {'django_language': 'testlang'}
     result = reporter.get_request_repr(request)
     self.assertIn(
         'testlang',
         result
     )
Exemple #6
0
 def test_report_language(self):
     reporter = WeblateExceptionReporterFilter()
     request = HttpRequest()
     request.session = {'django_language': 'testlang'}
     reporter.get_post_parameters(request)
     self.assertIn(
         'WEBLATE_LANGUAGE',
         request.META
     )
Exemple #7
0
 def test_report_language(self):
     reporter = WeblateExceptionReporterFilter()
     request = HttpRequest()
     request.session = {'django_language': 'testlang'}
     reporter.get_post_parameters(request)
     self.assertIn(
         'WEBLATE_LANGUAGE',
         request.META
     )
Exemple #8
0
 def test_report_none(self):
     reporter = WeblateExceptionReporterFilter()
     result = reporter.get_post_parameters(None)
     self.assertEqual(result, {})
Exemple #9
0
 def test_report_language(self):
     reporter = WeblateExceptionReporterFilter()
     request = HttpRequest()
     request.session = {'django_language': 'testlang'}
     result = reporter.get_request_repr(request)
     self.assertIn('testlang', result)
Exemple #10
0
 def test_report_request(self):
     reporter = WeblateExceptionReporterFilter()
     result = reporter.get_request_repr(HttpRequest())
     self.assertIn('HttpRequest', result)
Exemple #11
0
 def test_report_none(self):
     reporter = WeblateExceptionReporterFilter()
     result = reporter.get_request_repr(None)
     self.assertEqual('None', result)
Exemple #12
0
 def test_report_none(self):
     reporter = WeblateExceptionReporterFilter()
     result = reporter.get_post_parameters(None)
     self.assertEqual(result, {})