Skip to content

Commit

Permalink
clean up for PR
Browse files Browse the repository at this point in the history
refs #82
  • Loading branch information
guruofgentoo committed Oct 6, 2020
1 parent f1982fa commit c0e7727
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 0 additions & 2 deletions webgrid/tests/helpers.py
Expand Up @@ -95,8 +95,6 @@ def query_to_str(statement, bind=None):

dialect = bind.dialect
compiler = statement._compiler(dialect)
print('Compiler: ', compiler, type(compiler))

literal_compiler = compiler_instance_factory(compiler, dialect, statement)
return 'TESTING ONLY BIND: ' + literal_compiler.process(statement)

Expand Down
8 changes: 5 additions & 3 deletions webgrid/tests/test_rendering.py
Expand Up @@ -52,7 +52,9 @@
from .helpers import eq_html, inrequest, render_in_grid


def query_exclude_person(query):
def _query_exclude_person(query):
# this is pretty limited, but only used in the below couple of grids to
# exclude the third Person record
persons = Person.query.order_by(Person.id).limit(3).all()
exclude_id = persons[2].id if len(persons) >= 3 else -1
return query.filter(Person.id != exclude_id)
Expand All @@ -68,7 +70,7 @@ def query_prep(self, query, has_sort, has_filters):

# default filter
if not has_filters:
query = query_exclude_person(query)
query = _query_exclude_person(query)

return query

Expand All @@ -85,7 +87,7 @@ def query_prep(self, query, has_sort, has_filters):

# default filter
if not has_filters:
query = query_exclude_person(query)
query = _query_exclude_person(query)

return query

Expand Down

0 comments on commit c0e7727

Please sign in to comment.