def setUp(self): self.mock_sender = Mock() self.client = MetlogClient(self.mock_sender, self.logger) # overwrite the class-wide threadlocal w/ an instance one # so values won't persist btn tests self.client.timer._local = threading.local() plugin = config_plugin({'net':False}) self.client.add_method('procinfo', plugin)
def test_invalid_metlog_arg(self): with self.assertRaises(SyntaxError): plugin = config_plugin({'thread_io':True})