def testResolveRuleWithForcedName(self): """ unit-test for uktils.typo._resolve_rule with forced_name arg """ self.assert_( callable(typo._resolve_rule_name('testrule', 'newrule')[1] )) self.assert_( callable(typo._resolve_rule_name(cb_testrule, 'newrule')[1] )) self.assertEquals( 'newrule', typo._resolve_rule_name('testrule', 'newrule')[0] ) self.assertEquals( 'newrule', typo._resolve_rule_name(cb_testrule, 'newrule')[0] )
def testResolveRule(self): """ unit-test for uktils.typo._resolve_rule """ self.assert_( callable( typo._resolve_rule_name('testrule')[1] )) self.assert_( callable( typo._resolve_rule_name(cb_testrule)[1] )) self.assertEquals( 'testrule', typo._resolve_rule_name('testrule')[0] ) self.assertEquals( 'cb_testrule', typo._resolve_rule_name(cb_testrule)[0] )