We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6141b3a + b29dc07 commit bf41c57Copy full SHA for bf41c57
tests.py
@@ -4,6 +4,7 @@
4
import unittest
5
import logging
6
import json
7
+import os.path
8
9
10
from django.core.handlers.wsgi import WSGIRequest
@@ -319,7 +320,7 @@ def test_logger_name_is_test(self):
319
320
def test_path_name_is_test(self):
321
logger.error('An error has occured')
322
json_record = json.loads(log_buffer.getvalue())
- self.assertIn('json-log-formatter/tests.py', json_record['pathname'])
323
+ self.assertIn(os.path.basename(os.path.abspath('.')) + '/tests.py', json_record['pathname'])
324
325
def test_process_name_is_MainProcess(self):
326
0 commit comments