Revision 03ec545a test/ganeti.qlang_unittest.py

b/test/ganeti.qlang_unittest.py
186 186
                     [qlang.OP_OR, [qlang.OP_EQUAL, "name", "web1"],
187 187
                                   [qlang.OP_EQUAL, "name", "web2"]])
188 188

  
189
  def testPlainNamesOtherNamefield(self):
190
    self.assertEqual(qlang.MakeFilter(["mailA", "mailB"], False,
191
                                      namefield="id"),
192
                     [qlang.OP_OR, [qlang.OP_EQUAL, "id", "mailA"],
193
                                   [qlang.OP_EQUAL, "id", "mailB"]])
194

  
189 195
  def testForcedFilter(self):
190 196
    for i in [None, [], ["1", "2"], ["", "", ""], ["a", "b", "c", "d"]]:
191 197
      self.assertRaises(errors.OpPrereqError, qlang.MakeFilter, i, True)

Also available in: Unified diff