예제 #1
0
def next_proc(request):
    """
        :param: HttpRequest
        :rtype: HttpResponse    
        If the current item is the last one in the hunt, next_proc() redirect to render_congrats
        Otherwise, it calls pop_item() to update the global list of items and redirects to render_clue()
    """
    global TEMP
    TEMP = pop_item(TEMP)
    if len(TEMP) > 0:
        return redirect("rend_clue")
    else:
        return redirect("rend_congrats")
예제 #2
0
 def test_pop_item(self):  # DONE
     lst = [1]
     lst = models.pop_item(lst)
     self.assertTrue(len(lst) < 1)