Fix build break

This commit is contained in:
Arun Prakash Jana 2018-07-19 02:27:15 +05:30
parent 982db164af
commit de7a6993e0
No known key found for this signature in database
GPG Key ID: A75979F35C080412
3 changed files with 6 additions and 6 deletions

View File

@ -556,7 +556,7 @@ def view_statistic():
def create_app(config_filename=None):
"""create app."""
app = FlaskAPI(__name__)
per_page = int(os.getenv('BUKUSERVER_PER_PAGE', views.DEFAULT_PER_PAGE))
per_page = int(os.getenv('BUKUSERVER_PER_PAGE', str(views.DEFAULT_PER_PAGE)))
per_page = per_page if per_page > 0 else views.DEFAULT_PER_PAGE
app.config['BUKUSERVER_PER_PAGE'] = per_page
url_render_mode = os.getenv('BUKUSERVER_URL_RENDER_MODE', views.DEFAULT_URL_RENDER_MODE)

View File

@ -16,7 +16,7 @@ from tempfile import TemporaryDirectory
from hypothesis import given, example
from hypothesis import strategies as st
from unittest import mock as mock
from unittest import mock
import pytest
import unittest
import yaml
@ -768,12 +768,12 @@ def test_delete_rec_range_and_delay_commit(setup, low, high, delay_commit, input
n_low, n_high = normalize_range(db_len=db_len, low=low, high=high)
exp_res = True
if n_high > db_len and n_low <= db_len:
if n_high > db_len >= n_low:
exp_db_len = db_len - (db_len + 1 - n_low)
elif n_high == n_low and n_low > db_len:
elif n_high == n_low > db_len:
exp_db_len = db_len
exp_res = False
elif n_high == n_low and n_low <= db_len:
elif n_high == n_low <= db_len:
exp_db_len = db_len - 1
else:
exp_db_len = db_len - (n_high + 1 - n_low)