Skip to content

Commit

Permalink
graylog error solving
Browse files Browse the repository at this point in the history
  • Loading branch information
quimmrc committed Jan 23, 2025
1 parent 81a8a96 commit 92c53c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions monitor/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_monitor_queries_stats_ajax_error(self, mock_get):
resp = self.client.get(reverse('monitor-queries-stats-ajax'))

self.assertEqual(resp.status_code, 500)
mock_get.assert_called_with('http://graylog/graylog/api/search/universal/relative/terms', auth=mock.ANY, params=mock.ANY)
mock_get.assert_called_with('http://graylog/api/search/universal/relative/terms', auth=mock.ANY, params=mock.ANY)

@override_settings(GRAYLOG_DOMAIN='http://graylog')
@mock.patch('requests.get')
Expand All @@ -29,7 +29,7 @@ def test_monitor_queries_stats_ajax_bad_data(self, mock_get):
resp = self.client.get(reverse('monitor-queries-stats-ajax'))

self.assertEqual(resp.status_code, 500)
mock_get.assert_called_with('http://graylog/graylog/api/search/universal/relative/terms', auth=mock.ANY, params=mock.ANY)
mock_get.assert_called_with('http://graylog/api/search/universal/relative/terms', auth=mock.ANY, params=mock.ANY)

@override_settings(GRAYLOG_DOMAIN='http://graylog')
@mock.patch('requests.get')
Expand All @@ -43,4 +43,4 @@ def test_monitor_queries_stats_ajax_ok(self, mock_get):

self.assertEqual(resp.status_code, 200)
self.assertJSONEqual(resp.content, {'response': 'ok'})
mock_get.assert_called_with('http://graylog/graylog/api/search/universal/relative/terms', auth=mock.ANY, params=mock.ANY)
mock_get.assert_called_with('http://graylog/api/search/universal/relative/terms', auth=mock.ANY, params=mock.ANY)

0 comments on commit 92c53c7

Please sign in to comment.