Skip to content

Commit

Permalink
test with lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkent committed Nov 18, 2024
1 parent c078b37 commit 282d812
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions store/neurostore/resources/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def validate_search_query(query: str) -> bool:
Returns:
bool: True if the query is valid, False otherwise.
"""
query = query.upper()

# Check for valid parentheses
if not validate_parentheses(query):
raise errors.SyntaxError("Unmatched parentheses")
Expand Down
1 change: 1 addition & 0 deletions store/neurostore/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ def simple_neurosynth_annotation(session, ingest_neurosynth):
"Unmatched parentheses",
),
('"autism" OR "ASD" OR "autistic" OR ', "Query cannot end with an operator"),
("memory and", "Query cannot end with an operator"),
(
'(("Autism Spectrum Disorder" OR "autism spectrum disorder") OR ("Autism" OR "autism") '
'OR ("ASD")) AND (("decision*" OR "Dec',
Expand Down

0 comments on commit 282d812

Please sign in to comment.