44 domain1 = "gnc.engine.scrub"
45 msg1 = "[xaccScrubUtilityGetOrMakeAccount()] No currency specified!"
46 level = G_LOG_LEVEL_CRITICAL
48 check1.log_domain = domain1
49 check1.log_level = level
50 check1.msg = msg1
51 hdlr1 = test_set_checked_handler(domain1, level, check1)
52 domain2 = "gnc.engine"
53 msg2 = "[xaccTransScrubSplits()] Transaction doesn't have a currency!"
54 level = G_LOG_LEVEL_CRITICAL
56 check2.log_domain = domain2
57 check2.log_level = level
58 check2.msg = msg2
59 hdlr2 = test_set_checked_handler(domain2, level, check2)
60
61 TRANS = Transaction(self.book)
62 self.split.SetParent(TRANS)
63 TRANS.SetCurrency(self.currency)
64 TRANS.SetDescription("Foo")
65 self.assertEqual( TRANS.GetDescription(), self.split.GetParent().GetDescription() )
66
67 g_log_remove_handler(domain2, hdlr2)
68 g_log_remove_handler(domain1, hdlr1)
69
Struct to pass as user_data for the handlers.