The password you entered is incorrect. Did you forget your password?
|
import datetime import pytest from fbchat._session import ( base36encode, prefix_url, generate_message_id, client_id_factory, is_home, get_error_data, ) @pytest.mark.parametrize( "number,expected", [(1, "1"), (10, "a"), (123, "3f"), (1000, "rs"), (123456789, "21i3v9")], ) def test_base36encode(number, expected): assert base36encode(number) == expected def test_prefix_url(): assert prefix_url("/") == "https://www.facebook.com/" assert prefix_url("/abc") == "https://www.facebook.com/abc" def test_generate_message_id(): # Returns random output, so hard to test more thoroughly assert generate_message_id(datetime.datetime.utcnow(), "def") def test_client_id_factory(): # Returns random output, so hard to test more thoroughly assert client_id_factory() def test_is_home(): assert not is_home("https://m.facebook.com/login/?...") assert is_home("https://m.facebook.com/home.php?refsrc=...") @pytest.mark.skip def test_get_error_data(): html = """
The password you entered is incorrect. Did you forget your password?
|