示例#1
0
def test_update_contact_for_user_no_user(session):  # pylint: disable=unused-argument
    """Assert that a contact cannot be updated for a user that does not exist."""
    with pytest.raises(BusinessException) as exception:
        UserService.update_contact(TestJwtClaims.user_test,
                                   TestContactInfo.contact2)
    assert exception.value.code == Error.DATA_NOT_FOUND.name
示例#2
0
def test_update_contact_for_user_no_user(session):  # pylint: disable=unused-argument
    """Assert that a contact cannot be updated for a user that does not exist."""
    with pytest.raises(BusinessException) as exception:
        UserService.update_contact(TEST_TOKEN, TEST_UPDATED_CONTACT_INFO)
    assert exception.value.code == Error.DATA_NOT_FOUND.name