def test_TSO_maxID(self):

        tso = self.getCopy()
        correct_values = [ self.generateInt(1,999999999) for x in range(0,10) ]

        for value in correct_values:
            tso.set_max_id(value)
            cor = '%s&max_id=%i' % (self.__tso.create_search_url(), value)
            self.assertEqualQuery(tso.create_search_url(), cor)

        # wrong values
        wrong_values = [ -1, 1.0, '', [], {} ]
        for value in wrong_values:
            try:
                tso.set_max_id(value)
                self.assertTrue(False, "Not raising exception for %s" % value)
            except TwitterSearchException as e:
                self.assertEqual(e.code, 1004, "Wrong exception code")
Tests TwitterSearchOrder.set_max_id()
dataset/ETHPy150Open ckoepp/TwitterSearch/tests/test_tso.py/TwitterSearchOrderTest.test_TSO_maxID