예제 #1
0
 def test_next_url_constructed_when_end_not_reached(self, app):
     with app.test_request_context():
         url = view._get_next_url('q', 1, 10, 100)
         assert url == 'http://localhost/?query=q&position=11&size=10'
예제 #2
0
 def test_next_url_not_constructed_when_end_reached(self, app):
     with app.test_request_context():
         url = view._get_next_url("q", 90, 10, 100)
         assert url is None
예제 #3
0
 def test_next_url_not_constructed_when_end_reached(self, app):
     with app.test_request_context():
         url = view._get_next_url('q', 90, 10, 100)
         assert url is None
예제 #4
0
 def test_next_url_constructed_when_end_not_reached(self, app):
     with app.test_request_context():
         url = view._get_next_url("q", 1, 10, 100)
         assert url == "http://localhost/?query=q&position=11&size=10"