Fix build break
This commit is contained in:
parent
982db164af
commit
de7a6993e0
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user