def test_url_validation_with_empty_string(): """ Given: - Empty string as next link url When - Got a bad input from the user Then - Returns Demisto error """ next_link_url = "" try: url_validation(next_link_url) except CommonServerPython.DemistoException: assert True else: assert False
def test_url_validation_with_invalid_url(): """ Given: - invalid string as next link url When - Got a bad input from the user Then - Returns Demisto error """ try: url_validation(arguments["invalid_next_link_url"]) except CommonServerPython.DemistoException: assert True else: assert False
def test_url_validation_with_valid_link(): """ Given: - Link to more results for list commands When - There is too many results Then - Returns True if next link url is valid """ res = url_validation(arguments["valid_next_link_url"]) assert res == arguments["valid_next_link_url"]