コード例 #1
0
ファイル: test_xpath.py プロジェクト: saketkanth/commcare-hq
 def test_complex(self):
     xp = XPath.and_(
         XPath('a').eq('1'),
         XPath('b').neq(XPath.string('')),
         XPath.or_(
             XPath('c').eq(XPath.string('')),
             XPath.date('d').neq('today()')
         ))
     self.assertEqual("a = 1 and b != '' and (c = '' or date(d) != today())", xp)
コード例 #2
0
ファイル: test_xpath.py プロジェクト: ye-man/commcare-hq
 def test_complex(self):
     xp = XPath.and_(
         XPath('a').eq('1'),
         XPath('b').neq(XPath.string('')),
         XPath.or_(
             XPath('c').eq(XPath.string('')),
             XPath.date('d').neq('today()')))
     self.assertEqual(
         "a = 1 and b != '' and (c = '' or date(d) != today())", xp)
コード例 #3
0
ファイル: test_xpath.py プロジェクト: saketkanth/commcare-hq
 def test_date(self):
     self.assertEqual('date(a)', XPath.date('a'))
コード例 #4
0
ファイル: test_xpath.py プロジェクト: ye-man/commcare-hq
 def test_date(self):
     self.assertEqual('date(a)', XPath.date('a'))