Skip to content
Snippets Groups Projects
Commit a612b018 authored by Martin Burchell's avatar Martin Burchell
Browse files

Add API test for filter by enumerator

parent 127a0b47
Branches
No related tags found
1 merge request!102Filter fixes
...@@ -122,6 +122,26 @@ def test_filter_by_location(): ...@@ -122,6 +122,26 @@ def test_filter_by_location():
assert payload[0]['location'] == 'somewhere' assert payload[0]['location'] == 'somewhere'
@pytest.mark.django_db
def test_filter_by_enumeraotr():
create_item(
body='item1',
ennumerator='Yasmin')
create_item(
body='item2',
ennumerator='Collected by ....Mohammed yousuf@ Mohammed Ullah'
)
payload = get(
data={
'ennumerator': 'Collected by ....Mohammed yousuf@ Mohammed Ullah',
}
).data
assert len(payload) == 1
assert payload[0]['body'] == 'item2'
@pytest.mark.django_db @pytest.mark.django_db
def test_filter_by_multiple_terms(): def test_filter_by_multiple_terms():
# TODO: Refactor to use the REST API when we can add # TODO: Refactor to use the REST API when we can add
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment