Fix tests
This commit is contained in:
@@ -54,7 +54,8 @@ def test_fetch_image_url(client):
|
||||
@pytest.fixture
|
||||
def open_resource(pytestconfig):
|
||||
def get_resource_inner(filename):
|
||||
return open(os.path.join(pytestconfig.root, "resources", filename), "rb")
|
||||
path = os.path.join(pytestconfig.rootdir, "tests", "resources", filename)
|
||||
return open(path, "rb")
|
||||
|
||||
return get_resource_inner
|
||||
|
||||
@@ -76,7 +77,7 @@ def test_upload_many(client, open_resource):
|
||||
) as f_mp3, open_resource(
|
||||
"video.mp4"
|
||||
) as f_mp4:
|
||||
files = client.upload(
|
||||
_ = client.upload(
|
||||
[
|
||||
("image.png", f_png, "image/png"),
|
||||
("image.jpg", f_jpg, "image/jpeg"),
|
||||
@@ -88,10 +89,6 @@ def test_upload_many(client, open_resource):
|
||||
]
|
||||
)
|
||||
|
||||
print(files)
|
||||
|
||||
raise 2
|
||||
|
||||
|
||||
# def test_mark_as_read(client):
|
||||
# client.mark_as_read([thread1, thread2])
|
||||
|
@@ -110,6 +110,15 @@ def test_find_form_request():
|
||||
</div>
|
||||
"""
|
||||
url, data = find_form_request(html)
|
||||
assert url.startswith("https://www.facebook.com/checkpoint/")
|
||||
assert {
|
||||
"jazoest": "some-number",
|
||||
"fb_dtsg": "some-base64",
|
||||
"nh": "some-hex",
|
||||
"no_fido": "true",
|
||||
"approvals_code": "[missing]",
|
||||
"submit[Continue]": "Continue",
|
||||
} == data
|
||||
|
||||
|
||||
def test_find_form_request_error():
|
||||
|
Reference in New Issue
Block a user