示例#1
0
def test_get_update_room_metadata(mocked_method):
    messages.Api(upwork.Client).update_room_metadata("company", "room_id")
    mocked_method.assert_called_with("/messages/v3/company/rooms/room_id", {})
示例#2
0
def test_get_rooms(mocked_method):
    messages.Api(upwork.Client).get_rooms("company")
    mocked_method.assert_called_with("/messages/v3/company/rooms", {})
示例#3
0
def test_get_update_room_settings(mocked_method):
    messages.Api(upwork.Client).update_room_settings("company", "room_id",
                                                     "username")
    mocked_method.assert_called_with(
        "/messages/v3/company/rooms/room_id/users/username", {})
示例#4
0
def test_send_message_to_room(mocked_method):
    messages.Api(upwork.Client).send_message_to_room("company", "room_id")
    mocked_method.assert_called_with(
        "/messages/v3/company/rooms/room_id/stories", {})
示例#5
0
def test_get_room_by_contract(mocked_method):
    messages.Api(upwork.Client).get_room_by_contract("company", "contract_id")
    mocked_method.assert_called_with(
        "/messages/v3/company/rooms/contracts/contract_id", {})
示例#6
0
def test_get_room_by_application(mocked_method):
    messages.Api(upwork.Client).get_room_by_application(
        "company", "application_id")
    mocked_method.assert_called_with(
        "/messages/v3/company/rooms/applications/application_id", {})
示例#7
0
def test_get_room_by_offer(mocked_method):
    messages.Api(upwork.Client).get_room_by_offer("company", "offer_id")
    mocked_method.assert_called_with(
        "/messages/v3/company/rooms/offers/offer_id", {})
def test_send_message_to_rooms(mocked_method):
    messages.Api(upwork.Client).send_message_to_rooms("company")
    mocked_method.assert_called_with("/messages/v3/company/stories/batch", {})