Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bf41c57

Browse files
Merge pull request #30 from kapouer/patch-1
test: do not assume parent directory name
2 parents 6141b3a + b29dc07 commit bf41c57

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎tests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import unittest
55
import logging
66
import json
7+
import os.path
78

89

910
from django.core.handlers.wsgi import WSGIRequest
@@ -319,7 +320,7 @@ def test_logger_name_is_test(self):
319320
def test_path_name_is_test(self):
320321
logger.error('An error has occured')
321322
json_record = json.loads(log_buffer.getvalue())
322-
self.assertIn('json-log-formatter/tests.py', json_record['pathname'])
323+
self.assertIn(os.path.basename(os.path.abspath('.')) +'/tests.py', json_record['pathname'])
323324

324325
def test_process_name_is_MainProcess(self):
325326
logger.error('An error has occured')

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /