def test_parseUnikeyRules(self): unikeyContent = '''\ DO NOT DELETE THIS LINE*** version=1 *** kg:không kgcd:Không Gian Cộng Đồng vn:Việt Nam ''' parsedRules = tablemodel.parseUnikeyRules(unikeyContent) expected_rules = { 'kg': 'không', 'kgcd': 'Không Gian Cộng Đồng', 'vn': 'Việt Nam' } eq_(parsedRules, expected_rules)
def test_parseUnikeyRules_wrong(self): unikeyContent = "" parsedRules = tablemodel.parseUnikeyRules(unikeyContent) eq_(parsedRules, {})