Ejemplo n.º 1
0
    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()
Ejemplo n.º 2
0
    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()
Ejemplo n.º 3
0
    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()
Ejemplo n.º 4
0
 def test_get_nonexistent(self):
     tools.ok_(problem.get('random', False, self.proxy) is None)
Ejemplo n.º 5
0
 def test_get_nonexistent(self):
     tools.ok_(problem.get('random', False, self.proxy) is None)
Ejemplo n.º 6
0
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)
Ejemplo n.º 7
0
 def test_get_nonexistent(self):
     assert problem.get('random', False, self.proxy) is None