Beispiel #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'
 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
Beispiel #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
 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"