def test_validate_post_reaction_if_not_exists_raise_exception():
    user_id = 1
    post_id = 1
    sql_storage = StorageImplementation()

    with pytest.raises(ReactionDoesNotExist):
        sql_storage.validate_post_reaction_if_exists_get_reaction_type(
            user_id=user_id, post_id=post_id)
예제 #2
0
def test_validate_post_reaction_if_exists_get_reaction_type_if_reaction_not_exists_raise_exception(
        create_users, create_posts, create_comments, create_reactions):

    # Arrange
    user_id = -1
    post_id = -1
    storage = StorageImplementation()

    # Act
    with pytest.raises(ReactionDoesNotExists):
        storage.validate_post_reaction_if_exists_get_reaction_type(
            user_id=user_id, post_id=post_id)