예제 #1
0
파일: test_farcy.py 프로젝트: balloob/farcy
 def test_no_handler_factory__multiple_calls(self):
     func = no_handler_debug_factory(1)
     func(self.farcy, '.js')
     func(self.farcy, '.css')
     assert_calls(self.farcy.log.debug,
                  call('No handlers for extension .js'),
                  call('No handlers for extension .css'))
예제 #2
0
 def test_no_handler_factory__multiple_calls(self):
     func = no_handler_debug_factory(1)
     func(self.farcy, '.js')
     func(self.farcy, '.css')
     assert_calls(self.farcy.log.debug,
                  call('No handlers for extension .js'),
                  call('No handlers for extension .css'))
예제 #3
0
파일: test_farcy.py 프로젝트: balloob/farcy
 def test_no_handler_factory__output_when_cache_expired(self):
     func = no_handler_debug_factory(0)
     func(self.farcy, '.js')
     func(self.farcy, '.js')
     calls = [call('No handlers for extension .js')] * 2
     assert_calls(self.farcy.log.debug, *calls)
예제 #4
0
파일: test_farcy.py 프로젝트: balloob/farcy
 def test_no_handler_factory__cache_response(self):
     func = no_handler_debug_factory(1)
     func(self.farcy, '.js')
     func(self.farcy, '.js')
     self.farcy.log.debug.assert_called_once_with(
         'No handlers for extension .js')
예제 #5
0
 def test_no_handler_factory__output_when_cache_expired(self):
     func = no_handler_debug_factory(0)
     func(self.farcy, '.js')
     func(self.farcy, '.js')
     calls = [call('No handlers for extension .js')] * 2
     assert_calls(self.farcy.log.debug, *calls)
예제 #6
0
 def test_no_handler_factory__cache_response(self):
     func = no_handler_debug_factory(1)
     func(self.farcy, '.js')
     func(self.farcy, '.js')
     self.farcy.log.debug.assert_called_once_with(
         'No handlers for extension .js')