def test_wrong_name(self): val = 'name: index name' with self.assertRaises(ParseSyntaxException): index_setting.parseString(val, parseAll=True) val2 = 'name:,' with self.assertRaises(ParseSyntaxException): index_setting.parseString(val2, parseAll=True)
def test_note(self): val = 'note: "note text"' res = index_setting.parseString(val, parseAll=True) self.assertEqual(res['note'].text, 'note text')
def test_type(self): val = 'type: btree' res = index_setting.parseString(val, parseAll=True) self.assertEqual(res['type'], 'btree')
def test_name(self): val = 'name: "index name"' res = index_setting.parseString(val, parseAll=True) self.assertEqual(res['name'], 'index name')
def test_unique(self): val = 'unique' res = index_setting.parseString(val, parseAll=True) self.assertEqual(res['unique'], 'unique')