fix: search term moved to q
This commit is contained in:
committed by
Ben Lopatin
parent
a07b122c39
commit
53be265b23
@@ -844,17 +844,17 @@ class DiscourseClient:
|
||||
kwargs = {"email": user_email, "topic_id": topic_id}
|
||||
return self._post(f"/t/{topic_id}/invite.json", **kwargs)
|
||||
|
||||
def search(self, term, **kwargs):
|
||||
def search(self, q, **kwargs):
|
||||
"""
|
||||
|
||||
Args:
|
||||
term:
|
||||
q:
|
||||
**kwargs:
|
||||
|
||||
Returns:
|
||||
|
||||
"""
|
||||
kwargs["term"] = term
|
||||
kwargs["q"] = q
|
||||
return self._get("/search.json", **kwargs)
|
||||
|
||||
def badges(self, **kwargs):
|
||||
|
||||
@@ -166,8 +166,8 @@ class TestPosts:
|
||||
|
||||
class TestSearch:
|
||||
def test_search(self, discourse_client, discourse_request):
|
||||
request = discourse_request("get", "/search.json?term=needle")
|
||||
discourse_client.search(term="needle")
|
||||
request = discourse_request("get", "/search.json?q=needle")
|
||||
discourse_client.search(q="needle")
|
||||
assert request.called_once
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user