Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter owners select by text input #9337

Merged
merged 12 commits into from
Apr 7, 2020
Prev Previous commit
Next Next commit
deterministic tests
  • Loading branch information
suddjian committed Apr 3, 2020
commit 73170b8f56a406d0852978c987c7b82e2df5c1e1
11 changes: 2 additions & 9 deletions tests/base_api_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,20 +158,13 @@ def test_get_filter_related_owners(self):
API: Test get filter related owners
"""
self.login(username="admin")
argument = {"filter": "gamma"}
argument = {"filter": "mma u"}
uri = f"api/v1/{self.resource_name}/related/owners?q={prison.dumps(argument)}"

rv = self.client.get(uri)
self.assertEqual(rv.status_code, 200)
response = json.loads(rv.data.decode("utf-8"))
expected_response = {
"count": 3,
"result": [
{"text": "gamma user", "value": 2},
{"text": "gamma2 user", "value": 3},
{"text": "gamma_sqllab user", "value": 4},
],
}
expected_response = {"count": 1, "result": [{"text": "gamma user", "value": 2}]}
self.assertEqual(response, expected_response)

def test_get_related_fail(self):
Expand Down