Esempio n. 1
0
 def test_logging_profiling_is_disabled(self, mock_log):
     disable_profiling()
     queryset = User.query(name__in=['test1', 'test2'], order_by=['+aa', '-bb'], limit=1)
     result = log_query_and_profile_data_for_queryset(queryset=queryset)
     self.assertEqual(queryset, result)
     call_args_list = mock_log.debug.call_args_list
     self.assertItemsEqual(call_args_list, [])
Esempio n. 2
0
 def setUp(self):
     super(MongoDBProfilingTestCase, self).setUp()
     disable_profiling()