Skip to content

Commit

Permalink
Update search index date tests to throw TypeErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
kentsanggds committed Apr 29, 2021
1 parent cb480e9 commit 462a016
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ckan/tests/lib/search/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ def test_index_date_field_wrong_value(self):
"extras": [
{"key": "test_wrong_date", "value": "Not a date"},
{"key": "test_another_wrong_date", "value": "2014-13-01"},
{"key": "test_yet_another_wrong_date", "value": "2014-15"},
{"key": "test_yet_another_very_wrong_date", "value": "30/062012"},
]
}
)
Expand All @@ -154,6 +156,8 @@ def test_index_date_field_wrong_value(self):

assert "test_wrong_date" not in response.docs[0]
assert "test_another_wrong_date" not in response.docs[0]
assert "test_yet_another_wrong_date" not in response.docs[0]
assert "test_yet_another_very_wrong_date" not in response.docs[0]

def test_index_date_field_empty_value(self):

Expand Down

0 comments on commit 462a016

Please sign in to comment.