Skip to content

Commit

Permalink
Added tests for class_method parameter.
Browse files Browse the repository at this point in the history
This should resolve #1
  • Loading branch information
vimist committed Nov 27, 2017
1 parent 6f1d844 commit 5c421e4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,18 @@ def test__log_call(self):

self.assertEqual([log_record], self._logs)

def test__log_call_ignores_self_parameter_when_class_method_is_true(self):
self._logger_helper.call_log_format = '{args}'

def self_function(self, param_one):
"""Test function."""
return param_one

self._logger_helper._log_call(
self_function, [123, 456], {}, class_method=True)

self.assertEqual('param_one=456', self._logs[0])

def test__log_return(self):
self._logger_helper._log_return(basic_function, 'Test')

Expand Down

0 comments on commit 5c421e4

Please sign in to comment.