Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,6 @@ ENV/

# mypy
.mypy_cache/

.vscode/

1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
api-3.6.8
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
dist: trusty
dist: xenial
language: python
cache: pip
python:
- '2.7'
- '3.7'
install:
- pip install -r requirements.txt
- pip install coveralls
Expand Down
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ def valid_date(date):
Does a quick check on the date to avoid doing a db dip to get an error we could have avoided

Args:
date (basestring): the date input that we're validating
date (string): the date input that we're validating

Returns:
bool: whether or not we think the given input string is a date or not

"""
if not isinstance(date, basestring):
if date is None:
return False

try:
Expand Down
7 changes: 3 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Flask==1.0.2
zappa==0.47.1
zappa==0.48.2
Flask-Cors==3.0.7
Flask-Compress==1.4.0
pytest==4.3.0
pytest==4.4.0
pytest-cov==2.6.1
git+https://github.com/multiplechoice/sqlalchemy-mappings.git@2e5cab4d771137d42b59bf88fd92b7db6f1dbb3a

git+https://github.com/multiplechoice/sqlalchemy-mappings.git@17e50cfb97695badb192156ff98c39c07024d0ff
2 changes: 1 addition & 1 deletion tests/test_grouping.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_group_by_spider():

def test_group_when_key_missing():
grouped = group_results(examples, 'this_key_doesnt_exist')
assert grouped.keys() == ['unknown']
assert list(grouped.keys()) == ['unknown']
assert grouped['unknown'] == examples


Expand Down