-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: only show active user for chart/dashboard/datasource owner drop… (
- Loading branch information
Zef Lin
authored
Sep 6, 2022
1 parent
acd9515
commit 9be4870
Showing
6 changed files
with
78 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -264,10 +264,26 @@ def test_get_filter_related_owners(self): | |
assert 4 == response["count"] | ||
sorted_results = sorted(response["result"], key=lambda value: value["text"]) | ||
expected_results = [ | ||
{"text": "gamma user", "value": 2}, | ||
{"text": "gamma2 user", "value": 3}, | ||
{"text": "gamma_no_csv user", "value": 6}, | ||
{"text": "gamma_sqllab user", "value": 4}, | ||
{ | ||
"extra": {"active": True, "email": "[email protected]"}, | ||
"text": "gamma user", | ||
"value": 2, | ||
}, | ||
{ | ||
"extra": {"active": True, "email": "[email protected]"}, | ||
"text": "gamma2 user", | ||
"value": 3, | ||
}, | ||
{ | ||
"extra": {"active": True, "email": "[email protected]"}, | ||
"text": "gamma_no_csv user", | ||
"value": 6, | ||
}, | ||
{ | ||
"extra": {"active": True, "email": "[email protected]"}, | ||
"text": "gamma_sqllab user", | ||
"value": 4, | ||
}, | ||
] | ||
# TODO Check me | ||
assert expected_results == sorted_results | ||
|
@@ -286,8 +302,16 @@ def test_get_ids_related_owners(self): | |
assert 2 == response["count"] | ||
sorted_results = sorted(response["result"], key=lambda value: value["text"]) | ||
expected_results = [ | ||
{"text": "gamma user", "value": 2}, | ||
{"text": "gamma_sqllab user", "value": 4}, | ||
{ | ||
"extra": {"active": True, "email": "[email protected]"}, | ||
"text": "gamma user", | ||
"value": 2, | ||
}, | ||
{ | ||
"extra": {"active": True, "email": "[email protected]"}, | ||
"text": "gamma_sqllab user", | ||
"value": 4, | ||
}, | ||
] | ||
assert expected_results == sorted_results | ||
|
||
|
@@ -305,8 +329,16 @@ def test_get_repeated_ids_related_owners(self): | |
assert 2 == response["count"] | ||
sorted_results = sorted(response["result"], key=lambda value: value["text"]) | ||
expected_results = [ | ||
{"text": "gamma user", "value": 2}, | ||
{"text": "gamma_sqllab user", "value": 4}, | ||
{ | ||
"extra": {"active": True, "email": "[email protected]"}, | ||
"text": "gamma user", | ||
"value": 2, | ||
}, | ||
{ | ||
"extra": {"active": True, "email": "[email protected]"}, | ||
"text": "gamma_sqllab user", | ||
"value": 4, | ||
}, | ||
] | ||
assert expected_results == sorted_results | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters