def METHOD_NAME(self):
    username = "JamesTheMock"
    payload = "hello"
    expected = f"https://t.me/{username}?start={payload}"
    actual = helpers.create_deep_linked_url(username, payload)
    assert expected == actual
    expected = f"https://t.me/{username}?startgroup={payload}"
    actual = helpers.create_deep_linked_url(username, payload, group=True)
    assert expected == actual
    payload = ""
    expected = f"https://t.me/{username}"
    assert expected == helpers.create_deep_linked_url(username)
    assert expected == helpers.create_deep_linked_url(username, payload)
    payload = None
    assert expected == helpers.create_deep_linked_url(username, payload)
    with pytest.raises(ValueError, match="Only the following characters"):
        helpers.create_deep_linked_url(username, "text with spaces")
    with pytest.raises(ValueError, match="must not exceed 64"):
        helpers.create_deep_linked_url(username, "0" * 65)
    with pytest.raises(ValueError, match="valid bot_username"):
        helpers.create_deep_linked_url(None, None)
    with pytest.raises(ValueError, match="valid bot_username"):  # too short username, 4 is min
        helpers.create_deep_linked_url("abc", None)