from app.utils.minetest_hypertext import html_to_minetest conquer_html = """
Welcome to Conquer, a mod that adds RTS gameplay. It allows players to start Conquer sub-games, where they can place buildings, train units, and fight other players.
You can list running sessions by typing:
/conquer list
new line
another new line
You'll switch into Conquer playing mode, where you will be given buildings that you can place. You'll need to place a keep, which you must protect at all costs.
You may leave a game and return to normal playing mode at anytime by typing:
The Conquer GUI is the central place for monitoring your kingdom. Once in a session, you can view it by pressing the inventory key (I), or by punching/right-clicking the keep node.
""" conquer_expected = """ Welcome to Conquer, a mod that adds RTS gameplay. It allows players to start Conquer sub-games, where they can place buildings, train units, and fight other players. Starting or joining a session You can list running sessions by typing:/conquer list
new line
another new line
You'll switch into Conquer playing mode, where you will be given buildings that you can place. You'll need to place a keep, which you must protect at all costs.
You may leave a game and return to normal playing mode at anytime by typing:
Conquer GUI
The Conquer GUI is the central place for monitoring your kingdom. Once in a session, you can view it by pressing the inventory key (I), or by punching/right-clicking the keep node.
"""
def test_conquer():
assert html_to_minetest(conquer_html)["body"].strip() == conquer_expected.strip()
def test_images():
html = """
"""
expected = ""
result = html_to_minetest(html)
assert result["body"].strip() == expected.strip()
assert len(result["images"]) == 1
assert result["images"]["image_0"] == "/path/to/img.png"
def test_bullets():
html = """