def test_get(self): prob = self.create_problem() prob.add_current_process_data() ident = prob.save() prob2 = problem.get(ident, False, self.proxy) prob3 = problem.get(ident, True, self.proxy) tools.eq_(prob.reason, prob2.reason) tools.eq_(prob.reason, prob3.reason) prob.delete()
def test_get(self): prob = self.create_problem() prob.add_current_process_data() ident = prob.save() prob2 = problem.get(ident, False, self.proxy) prob3 = problem.get(ident, True, self.proxy) assert prob.reason == prob2.reason assert prob.reason == prob3.reason prob.delete()
def test_get_nonexistent(self): tools.ok_(problem.get('random', False, self.proxy) is None)
import json import time import problem import problem_info from problem_type import ProblemType for i in range(0, 1): items = problem_info.get_list(i, 100, ProblemType.Programming) for item in items: p = problem.get(item.ProblemSetID, item.ID) print(p.Title) time.sleep(2)
def test_get_nonexistent(self): assert problem.get('random', False, self.proxy) is None