def test_drop(self):
     self.assertJson(query.drop(2, [1, 2, 3]),
                     '{"collection":[1,2,3],"drop":2}')
Esempio n. 2
0
 def test_drop(self):
     self.assertEqual(self._q(query.drop(1, [1, 2])), [2])
     self.assertEqual(self._q(query.drop(3, [1, 2])), [])
     self.assertEqual(self._q(query.drop(-1, [1, 2])), [1, 2])