mirror of https://github.com/zulip/zulip.git
tests: Remove get-presence from curl test exclude_list.
This commit is contained in:
parent
7aabbe2f35
commit
2f5f23ecc6
|
@ -2,9 +2,12 @@ from typing import Dict, Any, Callable, Set, List
|
||||||
|
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
|
||||||
from zerver.models import get_realm, get_user, Client
|
from django.utils.timezone import now as timezone_now
|
||||||
|
|
||||||
|
from zerver.models import get_realm, get_user, Client, UserPresence
|
||||||
from zerver.lib.test_classes import ZulipTestCase
|
from zerver.lib.test_classes import ZulipTestCase
|
||||||
from zerver.lib.events import do_events_register
|
from zerver.lib.events import do_events_register
|
||||||
|
from zerver.lib.actions import update_user_presence
|
||||||
|
|
||||||
GENERATOR_FUNCTIONS = dict() # type: Dict[str, Callable[..., Dict[Any, Any]]]
|
GENERATOR_FUNCTIONS = dict() # type: Dict[str, Callable[..., Dict[Any, Any]]]
|
||||||
REGISTERED_GENERATOR_FUNCTIONS = set() # type: Set[str]
|
REGISTERED_GENERATOR_FUNCTIONS = set() # type: Set[str]
|
||||||
|
@ -119,3 +122,10 @@ def delete_event_queue() -> Dict[str, Any]:
|
||||||
"queue_id": response["queue_id"],
|
"queue_id": response["queue_id"],
|
||||||
"last_event_id": response["last_event_id"],
|
"last_event_id": response["last_event_id"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@openapi_param_value_generator(["/users/{email}/presence:get"])
|
||||||
|
def get_user_presence() -> Dict[None, None]:
|
||||||
|
iago = helpers.example_user("iago")
|
||||||
|
client = Client.objects.create(name="curl-test-client-3")
|
||||||
|
update_user_presence(iago, client, timezone_now(), UserPresence.ACTIVE, False)
|
||||||
|
return {}
|
||||||
|
|
|
@ -17,7 +17,6 @@ exclude_list = [
|
||||||
'delete-message.md',
|
'delete-message.md',
|
||||||
'remove-subscriptions.md',
|
'remove-subscriptions.md',
|
||||||
'delete-stream.md',
|
'delete-stream.md',
|
||||||
'get-presence.md',
|
|
||||||
'create-user-group.md',
|
'create-user-group.md',
|
||||||
'update-user-group.md',
|
'update-user-group.md',
|
||||||
'delete-user-group.md',
|
'delete-user-group.md',
|
||||||
|
|
Loading…
Reference in New Issue