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.
1 parent 6d054cb commit dbb9335Copy full SHA for dbb9335
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
@@ -318,7 +319,7 @@ def test_logger_name_is_test(self):
318
319
def test_path_name_is_test(self):
320
logger.error('An error has occured')
321
json_record = json.loads(log_buffer.getvalue())
- self.assertIn('json-log-formatter/tests.py', json_record['pathname'])
322
+ self.assertIn(os.path.basename(os.path.abspath('.')) + '/tests.py', json_record['pathname'])
323
324
def test_process_name_is_MainProcess(self):
325
0 commit comments